JP2011191972A - Device and method for measurement of motion vector - Google Patents

Device and method for measurement of motion vector Download PDF

Info

Publication number
JP2011191972A
JP2011191972A JP2010056971A JP2010056971A JP2011191972A JP 2011191972 A JP2011191972 A JP 2011191972A JP 2010056971 A JP2010056971 A JP 2010056971A JP 2010056971 A JP2010056971 A JP 2010056971A JP 2011191972 A JP2011191972 A JP 2011191972A
Authority
JP
Japan
Prior art keywords
motion vector
frame
target
interval
frt
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.)
Abandoned
Application number
JP2010056971A
Other languages
Japanese (ja)
Inventor
Makoto Yonaha
誠 與那覇
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2010056971A priority Critical patent/JP2011191972A/en
Publication of JP2011191972A publication Critical patent/JP2011191972A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To accurately detect a motion vector, even if objects varying in moving speed are included in a frame. <P>SOLUTION: The motion vector in a target pixel position on a target frame Frt is measured based on the target frame Frt in a plurality of consecutive frames and a past frame Frt-i separated by a predetermined frame interval from the target frame. In this process, an interval parameter setting part 4 sets an interval parameter representing an interval between the target frame Frt and the past frame Frt-i in measurement of the motion vector for each area or each pixel on the target frame Frt. Specifically, the interval parameter is set so that the frame interval is narrower in the area/pixel corresponding to an object moving at a higher speed. A motion vector measurement part 5 measures the motion vector according to the interval parameter. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、動画像における物体の動きを表す動きベクトルを計測する動きベクトル計測装置および方法並びに動きベクトル計測方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to a motion vector measuring apparatus and method for measuring a motion vector representing the motion of an object in a moving image, and a program for causing a computer to execute the motion vector measuring method.

画像の動きベクトルを計測する手段として、従来より相関演算に基づくブロックマッチング法が知られている。ブロックマッチング法は、動きベクトル計測の対象となる対象フレームを複数の適当な大きさのブロック(例えば8×8画素)に分割し、このブロック単位で過去のフレームとの画素の差を算出し、この差の絶対値の和が最小となる過去のフレームの画素位置を探索する方法である。ブロックマッチング法においては、フレーム間におけるブロックのずれが、対象フレームにおけるそのブロックの中心にある画素位置の動きベクトルを示すものとなる。   As a means for measuring an image motion vector, a block matching method based on a correlation calculation is conventionally known. The block matching method divides a target frame to be subjected to motion vector measurement into a plurality of appropriately sized blocks (for example, 8 × 8 pixels), calculates a pixel difference from a past frame in this block unit, This is a method of searching for a pixel position in a past frame in which the sum of absolute values of the differences is minimized. In the block matching method, a block shift between frames indicates a motion vector of a pixel position at the center of the block in the target frame.

また、動きベクトルを計測するに際し、オリジナルの解像度のフレームから、画素数を低減した低解像度のフレームを作成し、作成した低解像度のフレームを用いて、ブロックマッチング法により動きベクトルを計測する手法が提案されている(特許文献1参照)。特許文献1の手法によれば、低解像度のフレームを使用することにより、動きベクトルを計測するための演算量を低減できるため、高速に動きベクトルを計測することができる。   In addition, when measuring a motion vector, there is a method of creating a low-resolution frame with a reduced number of pixels from the original resolution frame, and measuring the motion vector by the block matching method using the created low-resolution frame. It has been proposed (see Patent Document 1). According to the technique of Patent Document 1, since the amount of calculation for measuring a motion vector can be reduced by using a low-resolution frame, the motion vector can be measured at high speed.

また、動きベクトルを計測する際の精度を向上させたり、演算量を低減させたりするための種々の手法が提案されている(特許文献2〜4参照)。特許文献2に記載された手法は、動きベクトルの計測に用いる対象フレームと過去フレームとの間のフレームを、設定されたフレーム数コマ落としし、コマ落としされたフレーム数に応じて、ブロックのサイズを変更することにより、精度を落とすことなく高速に動きベクトルを計測する手法である。また、特許文献3に記載された手法は、フレーム中に複数の移動物体がある場合に、その移動物体の領域毎に動きベクトルを求める手法である。また、特許文献4に記載された手法は、対象フレームと過去フレームとの間隔が大きくなると、物体の移動量が大きくなることから、動きベクトルの探索範囲を広げる手法である   In addition, various methods have been proposed for improving the accuracy when measuring a motion vector or reducing the amount of calculation (see Patent Documents 2 to 4). The technique described in Patent Document 2 drops the frame between the target frame used for measuring the motion vector and the past frame by the set number of frames, and the block size according to the number of frames dropped. Is a method of measuring a motion vector at high speed without reducing accuracy. The method described in Patent Document 3 is a method for obtaining a motion vector for each area of a moving object when there are a plurality of moving objects in the frame. Further, the method described in Patent Document 4 is a method of expanding a motion vector search range because the amount of movement of an object increases as the distance between the target frame and the past frame increases.

特許第3617671号公報Japanese Patent No. 3617671 特開平10−13836号公報JP-A-10-13836 特開平8−251474号公報JP-A-8-251474 特開平7−67116号公報JP-A-7-67116

しかしながら、特許文献1に記載された手法は、動きベクトルの検出に高階層のフレームを使用しているため、フレームに含まれる物体の小さな動きを検出することができない。また、小さな動きを検出するためには、再度低階層(高解像度)のフレームを用いて動きベクトルを検出する必要があるため、演算量を低減することができない。また、特許文献2に記載された手法は、移動速度が異なる物体がフレームに含まれる場合において、フレーム間隔が大きいと、移動速度が小さい物体の動きベクトルは精度よく検出できるが、移動速度が大きい物体はフレーム外に移動してしまう可能性があるため、動きベクトルを検出できない場合がある。また、特許文献3に記載された手法は、移動物体の領域毎に動きベクトルを求めることができるが、物体の移動速度に応じた処理を行っていないため、精度よく動きベクトルを求めることができない。さらに、特許文献4に記載された手法は、物体の移動量に応じて動きベクトルの探索範囲を広げているため、精度よく動きベクトルを検出できるものの、フレーム内に移動速度が異なる物体が含まれる場合には、対応することができない。   However, since the method described in Patent Document 1 uses a high-level frame for detecting a motion vector, it cannot detect a small motion of an object included in the frame. In addition, in order to detect a small motion, it is necessary to detect a motion vector again using a low-level (high resolution) frame, so that the amount of calculation cannot be reduced. Further, in the method described in Patent Document 2, when an object having a different moving speed is included in a frame, if the frame interval is large, a motion vector of an object having a low moving speed can be accurately detected, but the moving speed is high. Since the object may move out of the frame, the motion vector may not be detected. In addition, the method described in Patent Document 3 can obtain a motion vector for each area of a moving object, but cannot obtain a motion vector with high accuracy because processing according to the moving speed of the object is not performed. . Furthermore, since the method described in Patent Document 4 expands the search range of the motion vector according to the amount of movement of the object, although the motion vector can be detected with high accuracy, objects with different moving speeds are included in the frame. In case you can not cope.

本発明は、上記事情に鑑みなされたものであり、フレーム内に移動速度が異なる物体が含まれている場合であっても、精度よく動きベクトルを検出することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to accurately detect a motion vector even when an object having a different moving speed is included in a frame.

本発明による動きベクトル計測装置は、動画像に含まれる複数フレームにおける対象フレームと、該対象フレームから所定フレーム間隔離れた過去フレームとに基づいて、前記対象フレーム上の対象画素位置での動きベクトルを計測する動きベクトル計測装置において、
前記対象フレーム上における領域毎または画素毎に、前記動きベクトルを計測する際の前記対象フレームと前記過去フレームとのフレーム間隔を表す間隔パラメータを設定する間隔パラメータ設定手段と、
前記間隔パラメータにしたがって、前記動きベクトルを計測する動きベクトル計測手段とを備えたことを特徴とするものである。
The motion vector measuring apparatus according to the present invention calculates a motion vector at a target pixel position on the target frame based on the target frame in a plurality of frames included in the moving image and a past frame separated from the target frame by a predetermined frame interval. In the motion vector measuring device to measure,
Interval parameter setting means for setting an interval parameter representing a frame interval between the target frame and the past frame when measuring the motion vector for each region or pixel on the target frame;
And a motion vector measuring means for measuring the motion vector according to the interval parameter.

なお、本発明による動きベクトル計測装置においては、前記対象フレームおよび前記過去フレームを階層化する階層化手段をさらに備えるものとし、
前記間隔パラメータ変更手段を、最低階層以外の階層、すなわちオリジナルの解像度以外の解像度の前記対象フレーム上における領域毎または画素毎に前記間隔パラメータを設定する手段としてもよい。
The motion vector measurement device according to the present invention further includes a hierarchizing means for hierarchizing the target frame and the past frame,
The interval parameter changing unit may be a unit that sets the interval parameter for each region or each pixel on the target frame having a layer other than the lowest layer, that is, a resolution other than the original resolution.

また、本発明による動きベクトル計測装置においては、前記間隔パラメータを記憶する記憶手段をさらに備えるものとし、前記間隔パラメータ設定手段を、計測された前記動きベクトルが小さいほど、前記対象フレームと前記過去フレームとの間隔が大きくなるように前記記憶された間隔パラメータを更新する手段としてもよい。   The motion vector measurement device according to the present invention further includes a storage unit that stores the interval parameter, and the interval parameter setting unit includes the target frame and the past frame as the measured motion vector is smaller. It is also possible to update the stored interval parameter so that the interval between is increased.

また、本発明による動きベクトル計測装置においては、前記間隔パラメータを記憶する記憶手段をさらに備えるものとし、前記間隔パラメータ設定手段を、前記対象画素位置および該対象画素位置近傍の複数画素位置の複数の前記動きベクトルに基づいて、前記記憶された間隔パラメータを更新する手段としてもよい。   The motion vector measurement apparatus according to the present invention further includes a storage unit that stores the interval parameter, and the interval parameter setting unit includes a plurality of pixel positions at the target pixel position and a plurality of pixel positions in the vicinity of the target pixel position. The stored interval parameter may be updated based on the motion vector.

「対象画素位置および該対象画素位置近傍の複数画素位置の前記動きベクトルに基づいて、前記記憶された間隔パラメータを更新する」とは、対象画素位置の動きベクトルのみならず、対象画素位置近傍の動きベクトルを考慮して、間隔パラメータを変更することを意味する。例えば、対象画素位置の動きベクトルと対象画素位置近傍の動きベクトルにばらつきがなければ、その動きベクトルを計測した間隔パラメータを、次の対象フレームについての動きベクトルの計測に使用し、動きベクトルにばらつきがある場合、間隔パラメータにより表されるフレーム間隔、あるいは間隔パラメータが動きベクトルの計測に使用する過去フレームのフレーム数をも表すものである場合はフレーム数を変更して動きベクトルをより精度よく計測できるようにすればよい。   “Updating the stored interval parameter based on the motion vector of the target pixel position and a plurality of pixel positions in the vicinity of the target pixel position” means not only the motion vector of the target pixel position but also the vicinity of the target pixel position. This means that the interval parameter is changed in consideration of the motion vector. For example, if there is no variation between the motion vector at the target pixel position and the motion vector near the target pixel position, the interval parameter obtained by measuring the motion vector is used to measure the motion vector for the next target frame, and the motion vector varies. If there is a frame, the frame interval represented by the interval parameter, or if the interval parameter also represents the number of frames in the past frame used to measure the motion vector, change the number of frames to measure the motion vector more accurately. You can do it.

また、本発明による動きベクトル計測装置においては、前記間隔パラメータ設定手段を、前記フレーム間隔とともに、前記動きベクトルの計測に使用する前記過去フレームのフレーム数を表す前記間隔パラメータを設定する手段としてもよい。   In the motion vector measuring device according to the present invention, the interval parameter setting means may be a means for setting the interval parameter representing the number of frames of the past frame used for measuring the motion vector together with the frame interval. .

この場合、前記動きベクトル計測手段を、前記対象フレームに近いフレーム間隔の前記過去フレームから順に、あるいは前記対象フレームから離れたフレーム間隔の前記過去フレームから順に用いて前記動きベクトルを計測する手段であり、大きさが0以外の値の前記動きベクトルが計測されると、それ以降の前記過去フレームを用いての前記動きベクトルの計測を停止する手段としてもよい。   In this case, the motion vector measuring means is means for measuring the motion vector in order from the past frame at a frame interval close to the target frame or from the past frame at a frame interval away from the target frame. When the motion vector having a value other than 0 is measured, the motion vector measurement using the past frame after that may be stopped.

また、本発明による動きベクトル計測装置においては、前記動きベクトル計測手段を、前記対象画素位置および該対象画素位置近傍の複数画素位置の複数の前記動きベクトルに基づいて、前記対象画素位置の動きベクトルを決定する手段としてもよい。   In the motion vector measuring device according to the present invention, the motion vector measuring means may be configured to use the motion vector at the target pixel position based on the plurality of motion vectors at the target pixel position and a plurality of pixel positions near the target pixel position. It is good also as a means to determine.

本発明による動きベクトル計測方法は、動画像に含まれる複数フレームにおける対象フレームと、該対象フレームから所定フレーム間隔離れた過去フレームとに基づいて、前記対象フレーム上の対象画素位置での動きベクトルを計測する動きベクトル計測方法において、
前記対象フレーム上における領域毎または画素毎に、前記動きベクトルを計測する際の前記対象フレームと前記過去フレームとのフレーム間隔を表す間隔パラメータを設定し、
前記間隔パラメータにしたがって、前記動きベクトルを計測することを特徴とするものである。
The motion vector measurement method according to the present invention calculates a motion vector at a target pixel position on the target frame based on a target frame in a plurality of frames included in the moving image and a past frame separated from the target frame by a predetermined frame interval. In the motion vector measurement method to measure,
For each region or pixel on the target frame, set an interval parameter representing a frame interval between the target frame and the past frame when measuring the motion vector,
The motion vector is measured according to the interval parameter.

なお、本発明による動きベクトル計測方法をコンピュータに実行させるためのプログラムとして提供してもよい。   The motion vector measuring method according to the present invention may be provided as a program for causing a computer to execute the method.

動画像に含まれる物体のうち、移動速度が小さい物体は、対象フレームと過去フレームとのフレーム間隔が小さい場合には動きベクトルを精度よく検出することは困難であるが、フレーム間隔が大きくなるほど精度よく動きベクトルを検出できる。逆に、移動速度が大きい物体は、対象フレームと過去フレームとのフレーム間隔が大きいと、物体がフレーム外に移動してしまう可能性があるが、フレーム間隔が小さければ精度よく動きベクトルを検出できる。   Of the objects included in the moving image, it is difficult to detect the motion vector accurately when the frame interval between the target frame and the past frame is small, but the accuracy increases as the frame interval increases. Can detect motion vectors well. Conversely, an object with a high moving speed may move out of the frame if the frame interval between the target frame and the past frame is large. However, if the frame interval is small, the motion vector can be accurately detected. .

本発明は、対象フレームまたは過去フレーム上における領域毎または画素毎に、動きベクトルを計測する際の対象フレームと過去フレームとのフレーム間隔を表す間隔パラメータを設定し、間隔パラメータにしたがって動きベクトルを計測するようにしたものである。このため、フレーム中の物体の移動速度に応じた適切なフレーム間隔を設定することができ、その結果、物体の移動速度に拘わらず、精度よく動きベクトルを計測することができる。   The present invention sets an interval parameter representing a frame interval between a target frame and a past frame when measuring a motion vector for each region or pixel on the target frame or the past frame, and measures the motion vector according to the interval parameter. It is what you do. Therefore, an appropriate frame interval can be set according to the moving speed of the object in the frame, and as a result, the motion vector can be measured with high accuracy regardless of the moving speed of the object.

また、対象フレームおよび過去フレームを階層化し、最低階層以外の階層すなわち低解像度の対象フレーム上における領域毎または画素毎に間隔パラメータを設定することにより、演算量を低減して高速に動きベクトルを計測することができる。また、高階層のフレームを用いると、移動速度が小さい物体の動きベクトルの検出精度が低下するが、本発明によれば、フレーム中の物体の移動速度に応じた適切なフレーム間隔を設定することができるため、物体の移動速度に拘わらず、精度よくかつ高速に動きベクトルを計測することができる。   In addition, the target frame and the past frame are hierarchized, and by setting an interval parameter for each region or pixel on a layer other than the lowest layer, that is, a low-resolution target frame, the amount of calculation is reduced and the motion vector is measured at high speed. can do. In addition, when a high-level frame is used, the accuracy of detecting a motion vector of an object having a low moving speed is lowered, but according to the present invention, an appropriate frame interval can be set according to the moving speed of an object in the frame. Therefore, it is possible to measure the motion vector with high accuracy and high speed regardless of the moving speed of the object.

また、動きベクトルが小さいほど、対象フレームと過去フレームとの間隔が大きくなるように間隔パラメータを変更することにより、移動速度が小さい物体についての動きベクトルおよび移動速度が大きい物体についての動きベクトルの双方を精度よく検出することができる。   In addition, by changing the interval parameter so that the smaller the motion vector, the larger the interval between the target frame and the past frame, both the motion vector for an object with a low moving speed and the motion vector for an object with a high moving speed Can be detected with high accuracy.

また、対象画素位置および対象画素位置近傍の複数画素位置の複数の動きベクトルに基づいて間隔パラメータを変更することにより、物体の動きに応じて間隔パラメータを精度よく設定できるため、より精度よく動きベクトルを計測することができる。   In addition, since the interval parameter can be accurately set according to the motion of the object by changing the interval parameter based on the plurality of motion vectors at the target pixel position and a plurality of pixel positions in the vicinity of the target pixel position, the motion vector is more accurately detected. Can be measured.

また、複数の過去フレームを用いることにより、動きベクトルを確実に計測できる。   In addition, the motion vector can be reliably measured by using a plurality of past frames.

この場合、複数の過去フレームについて、対象フレームに近いフレーム間隔の過去フレームから順に、あるいは対象フレームから離れたフレーム間隔の過去フレームから順に用いて動きベクトルを計測し、大きさが0以外の値の動きベクトルが計測されると、それ以降の過去フレームを用いての動きベクトルの計測を停止することにより、複数フレームのすべてについて動きベクトルを計測しなくてもよくなるため、演算速度を向上させることができる。   In this case, for a plurality of past frames, the motion vector is measured in order from the past frame having a frame interval close to the target frame or from the past frame having a frame interval distant from the target frame. When a motion vector is measured, it is not necessary to measure the motion vector for all of the plurality of frames by stopping the motion vector measurement using the past frames thereafter, so that the calculation speed can be improved. it can.

また、対象画素位置および対象画素位置近傍の複数画素位置の複数の動きベクトルに基づいて、対象画素位置の動きベクトルを決定することにより、対象画素位置および対象画素位置近傍の動きベクトルのばらつきを抑えて、より精度よく対象画素位置の動きベクトルを計測することができる。   In addition, by determining the motion vector of the target pixel position based on the target pixel position and a plurality of motion vectors of a plurality of pixel positions in the vicinity of the target pixel position, variations in the motion vectors in the target pixel position and the vicinity of the target pixel position are suppressed. Thus, the motion vector at the target pixel position can be measured with higher accuracy.

本発明の実施形態による動きベクトル計測装置の構成を示す概略ブロック図1 is a schematic block diagram showing the configuration of a motion vector measuring device according to an embodiment of the present invention. 階層化部が行う処理を説明するための図The figure for demonstrating the process which a hierarchization part performs 間隔パラメータの設定を説明するための図Diagram for explaining setting of interval parameter 動きベクトル計測部の構成を示す概略ブロック図Schematic block diagram showing the configuration of the motion vector measurement unit 動きベクトルの分布の算出を説明するための図Diagram for explaining calculation of motion vector distribution 動きベクトルの再構成を説明するための図(その1)The figure for demonstrating the reconstruction of a motion vector (the 1) 動きベクトルの再構成を説明するための図(その2)Diagram for explaining reconstruction of motion vector (part 2) 動きベクトルの検出を説明するための図Diagram for explaining motion vector detection 第2の動きベクトルの計測を説明するための図The figure for demonstrating the measurement of a 2nd motion vector 自己動きベクトル分布の算出を説明するための図Diagram for explaining calculation of self-motion vector distribution 対象画素位置の動きベクトル検出空間に自己動きベクトル分布のスコアを割り当てた状態を示す図The figure which shows the state which allocated the score of self-motion vector distribution to the motion vector detection space of the object pixel position 本実施形態において行われる処理を示すフローチャートA flowchart showing processing performed in the present embodiment 間隔パラメータの更新を説明するための図Diagram for explaining interval parameter update 動きベクトルの計測処理のフローチャートFlow chart of motion vector measurement processing

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の実施形態による動きベクトル計測装置の構成を示す概略ブロック図である。図1に示すように、本実施形態による動きベクトル計測装置1は、フレームメモリ2、階層化部3、間隔パラメータ設定部4、動きベクトル計測部5、メモリ6および制御部7を備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing a configuration of a motion vector measuring apparatus according to an embodiment of the present invention. As shown in FIG. 1, the motion vector measurement device 1 according to the present embodiment includes a frame memory 2, a hierarchization unit 3, an interval parameter setting unit 4, a motion vector measurement unit 5, a memory 6, and a control unit 7.

フレームメモリ2は、不図示の画像入力装置から入力されたデジタルの動画像の画像データをフレーム単位で一時的に記憶する。なお、動きベクトルを計測する際の、動きベクトルの計測対象となるフレームを対象フレームFrt、動きベクトルの計測に用いる対象フレームFrtよりも過去のフレームを過去フレームFrt−i(i=1〜n:nは正の整数)とする。   The frame memory 2 temporarily stores image data of a digital moving image input from an image input device (not shown) in units of frames. When measuring a motion vector, a frame that is a measurement target of the motion vector is a target frame Frt, and a frame that is past the target frame Frt used for measuring the motion vector is a past frame Frt-i (i = 1 to n: n is a positive integer).

階層化部3は、フレームメモリ2に一時的に記憶された動画像の画像データの各フレームを階層化して、低解像度の階層フレームを作成する。なお、フレームメモリ2には、動画像の画像データのフレームが順次記憶されるため、階層化部3は、フレームメモリ2に順次記憶されるフレームを1回のみ階層化して、低解像度の階層フレームを作成する。図2は階層化部3が行う処理を説明するための図である。なお、図2において対象フレームFrtの階層化を示す。図2に示すように階層化部3は、階層化されていない最高解像度のフレーム(以下第1階層フレームFrt0−1とする)について、画素を間引くあるいは4画素の平均値を算出する等の公知の手法を用いて、第1階層フレームFrt0−1の解像度が1/2(縦横サイズが第1階層フレームFrt0−1の1/2)の第2階層フレームFrt0−2を作成する。また、第2階層フレームFrt0−2の解像度が1/2の第3階層フレームFrt0−3を作成する。さらに、第3階層フレームFrt0−3の解像度が1/2の第4階層フレームFrt0−4を作成する。   The hierarchizing unit 3 hires each frame of the image data of the moving image temporarily stored in the frame memory 2 to create a low resolution hierarchical frame. Since the frame memory 2 sequentially stores the frames of the image data of the moving image, the hierarchizing unit 3 hierarchizes the frames sequentially stored in the frame memory 2 only once to generate a low-resolution hierarchical frame. Create FIG. 2 is a diagram for explaining processing performed by the hierarchizing unit 3. FIG. 2 shows the hierarchization of the target frame Frt. As shown in FIG. 2, the hierarchizing unit 3 performs a known process such as thinning out pixels or calculating an average value of four pixels for a non-hierarchical highest resolution frame (hereinafter referred to as a first hierarchical frame Frt0-1). The second layer frame Frt0-2 in which the resolution of the first layer frame Frt0-1 is 1/2 (the vertical and horizontal size is 1/2 that of the first layer frame Frt0-1) is created using the above method. Also, a third layer frame Frt0-3 having a resolution of 1/2 of the second layer frame Frt0-2 is created. Further, a fourth layer frame Frt0-4 having a resolution of 1/2 of the third layer frame Frt0-3 is created.

なお、後述するように動きベクトルを計測する際には、フレームの解像度が低いほど演算量が少なく、高速に処理を行うことができるが、計測精度が低下する。したがって、作成するフレームの階層数は、必要とされる演算時間および計測精度に応じて、適宜設定すればよい。   As will be described later, when measuring a motion vector, the lower the frame resolution, the smaller the amount of calculation and the higher the processing speed, but the measurement accuracy decreases. Therefore, the number of layers of frames to be created may be set as appropriate according to the required calculation time and measurement accuracy.

間隔パラメータ設定部4は、対象フレームFrt上における画素毎に間隔パラメータを設定する。間隔パラメータは、動きベクトルを計測する際の、対象フレームFrtと過去フレームFrt−iとのフレーム間隔、および動きベクトルの計測に使用する過去フレームFrt−iのフレーム数を表す。以下、間隔パラメータの設定について説明する。図3は間隔パラメータの設定を説明するための図である。図3に示すように対象フレームFrtには、移動速度が異なる3つの物体の領域A1,A2,A3が含まれているものとする。また、移動速度はA1>A2>A3であるものとする。   The interval parameter setting unit 4 sets an interval parameter for each pixel on the target frame Frt. The interval parameter represents the frame interval between the target frame Frt and the past frame Frt-i when the motion vector is measured, and the number of frames of the past frame Frt-i used for measuring the motion vector. Hereinafter, setting of the interval parameter will be described. FIG. 3 is a diagram for explaining the setting of the interval parameter. As shown in FIG. 3, it is assumed that the target frame Frt includes areas A1, A2, and A3 of three objects having different moving speeds. The moving speed is assumed to be A1> A2> A3.

本実施形態においては、対象フレームFrtと、対象フレームFrtよりも時間的に過去の複数の過去フレームFrt−iをフレームメモリ2に記憶し、対象フレームFrtと過去フレームFrt−iのいずれかとを用いて、動きベクトルを計測する。なお、使用する過去フレームFrt−iの数は、動きベクトルの計測に使用するフレームの階層に応じて設定する。例えば、動きフレームの計測に使用するフレームの階層が第3階層であれば、第1階層における物体の1画素の動きは、過去フレームが4つあれば検出できる。また、動きフレームの計測に使用するフレームの階層が第4階層であれば、第1階層における物体の1画素の動きは、過去フレームが8つあれば検出できる。このため、動きベクトルの計測に使用する過去フレーム数は、動きベクトルの計測に使用するフレームの階層に応じて定められる数以上に設定すればよい。本実施形態においては、例えば第3階層のフレームを使用し、6つの過去フレームFrt−1〜Frt−6を使用して、動きベクトルを計測するものとする。   In the present embodiment, the target frame Frt and a plurality of past frames Frt-i that are earlier in time than the target frame Frt are stored in the frame memory 2, and either the target frame Frt or the past frame Frt-i is used. To measure the motion vector. Note that the number of past frames Frt-i to be used is set according to the hierarchy of frames used for motion vector measurement. For example, if the frame layer used for motion frame measurement is the third layer, the motion of one pixel of the object in the first layer can be detected if there are four past frames. If the frame layer used for measuring the motion frame is the fourth layer, the motion of one pixel of the object in the first layer can be detected if there are eight past frames. For this reason, the number of past frames used for measuring a motion vector may be set to be equal to or more than the number determined according to the hierarchy of frames used for measuring a motion vector. In the present embodiment, for example, a third layer frame is used, and a motion vector is measured using six past frames Frt-1 to Frt-6.

また、本実施形態においては、計測された動きベクトルの大きさに応じて、次の対象フレームの動きベクトルの計測に使用する対象フレームFrtと過去フレームFrt−iとのフレーム間隔を画素毎に設定する。例えば、最も移動速度が大きい領域A1内の画素については、間隔パラメータにより表されるフレーム間隔を1に設定し、対象フレームFrtと、対象フレームFrtに時間的に最も近い過去フレームFrt−1とを用いて動きベクトルの計測を行うようにする。また過去フレームFrt−1,Frt−2の2つの過去フレームを動きベクトルの計測に使用するようフレーム数を2に設定する。なお、複数の過去フレームを用いての動きベクトルの計測については後述する。   In the present embodiment, the frame interval between the target frame Frt and the past frame Frt-i used for measuring the motion vector of the next target frame is set for each pixel in accordance with the size of the measured motion vector. To do. For example, for the pixel in the region A1 where the moving speed is the highest, the frame interval represented by the interval parameter is set to 1, and the target frame Frt and the past frame Frt-1 closest in time to the target frame Frt are obtained. To measure the motion vector. The number of frames is set to 2 so that the two past frames Frt-1 and Frt-2 are used for measuring the motion vector. The measurement of the motion vector using a plurality of past frames will be described later.

また、領域A1の次に移動速度が大きい領域A2内の画素については、間隔パラメータにより表されるフレーム間隔を2に設定し、対象フレームFrtと過去フレームFrt−2とを用いて動きベクトルの計測を行うようにする。また、この場合、過去フレームFrt−2,Frt−3の2つの過去フレームを動きベクトルの計測に使用すべく、フレーム数を2に設定する。   For the pixels in the area A2 where the moving speed is the second highest after the area A1, the frame interval represented by the interval parameter is set to 2, and the motion vector is measured using the target frame Frt and the past frame Frt-2. To do. In this case, the number of frames is set to 2 so that the two past frames Frt-2 and Frt-3 are used for measuring the motion vector.

また、最も移動速度が小さい領域A3については、間隔パラメータにより表されるフレーム間隔を3に設定し、対象フレームFrtと過去フレームFrt−3とを用いて動きベクトルの計測を行うようにする。また、この場合、過去フレームFrt−3,Frt−4,Frt−5の3つの過去フレームを動きベクトルの計測に使用すべく、フレーム数を3に設定する。   For the region A3 where the moving speed is the lowest, the frame interval represented by the interval parameter is set to 3, and the motion vector is measured using the target frame Frt and the past frame Frt-3. In this case, the number of frames is set to 3 so that the past frames Frt-3, Frt-4, and Frt-5 can be used for motion vector measurement.

ここで、動きベクトルの計測に使用する過去フレームのフレーム数は、対象画素が含まれる物体の移動速度が小さいほど、すなわち間隔パラメータにより表されるフレーム間隔が大きいほど、多くすることが計測精度向上の観点から好ましい。例えば、本実施形態の場合、間隔パラメータにより表されるフレーム間隔が2以下の場合には、使用する過去フレーム数を2、フレーム間隔が3以上の場合には、使用する過去フレーム数を3と設定することが好ましい。   Here, the number of past frames used for motion vector measurement increases as the moving speed of the object including the target pixel decreases, that is, as the frame interval represented by the interval parameter increases, the measurement accuracy increases. From the viewpoint of For example, in the present embodiment, when the frame interval represented by the interval parameter is 2 or less, the number of past frames to be used is 2, and when the frame interval is 3 or more, the number of past frames to be used is 3. It is preferable to set.

なお、間隔パラメータ設定部4は、計測された動きベクトルに基づいて、次の対象フレームについて動きベクトルを計測する際の間隔パラメータを更新する。動きベクトルに基づく間隔パラメータの更新については後述する。   The interval parameter setting unit 4 updates the interval parameter when measuring the motion vector for the next target frame, based on the measured motion vector. The update of the interval parameter based on the motion vector will be described later.

また、間隔パラメータ設定部4は、動きベクトルを計測した後、対象フレームFrtの各画素位置において、動きベクトル計測の対象となる対象画素位置の動きベクトルと、対象画素位置周辺の複数の画素位置の動きベクトルとを比較し、すべての動きベクトルが同一の方向を向いていない、あるいはすべての動きベクトルの大きさが同一でない等、動きベクトルの方向が安定していない場合には、計測精度を向上させるために、動きベクトルの計測に使用する過去フレームの数が多くなるように、間隔パラメータを更新するものであってもよい。   Further, the interval parameter setting unit 4 measures the motion vector, and then, at each pixel position of the target frame Frt, the motion vector of the target pixel position that is the target of motion vector measurement and a plurality of pixel positions around the target pixel position. Compared with motion vectors, if all motion vectors are not pointing in the same direction or the size of all motion vectors is not the same, the measurement accuracy is improved. Therefore, the interval parameter may be updated so that the number of past frames used for motion vector measurement increases.

ここで、対象画素位置およびその周辺の複数の画素位置からなる領域内に、動きのある物体が存在しない場合、領域内の画素位置における動きベクトルの平均値は0となる。一方、領域内に動きのある物体が移動してくると、領域内への移動の侵入の程度が大きくなるにつれて、動きベクトルの平均値は大きくなる。したがって、間隔パラメータ設定部4は、動きベクトルを計測した後、対象フレームFrtの各画素位置において、動きベクトル計測の対象となる対象画素位置の動きベクトルと、対象画素位置周辺の複数の画素位置の動きベクトルとの平均値を算出し、平均値が大きいほどフレーム間隔が小さくなるとともに使用する過去フレームの数が少なくなり、平均値が小さいほどフレーム間隔が大きくなるとともに、使用する過去フレームの数が多くなるように、間隔パラメータを更新するものとしてもよい。   Here, in the case where there is no moving object in an area composed of the target pixel position and a plurality of surrounding pixel positions, the average value of the motion vectors at the pixel positions in the area is zero. On the other hand, when a moving object moves in the region, the average value of the motion vector increases as the degree of movement intrusion into the region increases. Therefore, the interval parameter setting unit 4 measures the motion vector, and then, at each pixel position of the target frame Frt, the motion vector of the target pixel position that is the target of motion vector measurement and a plurality of pixel positions around the target pixel position. Calculate the average value with the motion vector, and the larger the average value, the smaller the frame interval and the smaller the number of past frames to be used. The smaller the average value, the larger the frame interval and the number of past frames to be used. The interval parameter may be updated so as to increase.

ここで、動きベクトル計測のための1回目の処理時には、対象フレームFrtのすべての画素について動きベクトルが計測されていないため、画素毎に間隔パラメータを設定することができない。このため、動きベクトルの1回目の計測時には、間隔パラメータを設定することなく、対象フレームFrtとすべての過去フレームFrt−iとを用いて動きベクトルを計測し、動きベクトルの大きさに応じて、画素毎に間隔パラメータを設定すればよい。そして、2回目の動きベクトルの計測時には、1回目の動きベクトルの計測により設定された間隔パラメータを用いて動きベクトルを計測すればよい。   Here, at the time of the first processing for measuring the motion vector, since the motion vector is not measured for all the pixels of the target frame Frt, the interval parameter cannot be set for each pixel. Therefore, at the first measurement of the motion vector, the motion vector is measured using the target frame Frt and all the past frames Frt-i without setting the interval parameter, and according to the size of the motion vector, An interval parameter may be set for each pixel. Then, when measuring the second motion vector, the motion vector may be measured using the interval parameter set by the first motion vector measurement.

動きベクトル計測部5は、対象フレームFrtの各画素位置の動きベクトルを計測する。以下、動きベクトルの計測について説明する。なお、動きベクトル計測部5は、高階層の対象フレームおよび過去フレームを用いて動きベクトルを計測するが、以降の説明においては、高階層の対象フレームおよび過去フレームについても、参照符号としてFrtおよびFrt−iを用いるものとする。図4は動きベクトル計測部5の構成を示す概略ブロック図である。図4に示すように、動きベクトル計測部5は、動きベクトル分布算出部51、平均化処理部52、動きベクトル検出部53および誤計測判定部54を備える。以下、動きベクトル計測部5の動きベクトル分布算出部51、平均化処理部52、動きベクトル検出部53および誤計測判定部54が行う各処理について説明する。   The motion vector measuring unit 5 measures a motion vector at each pixel position of the target frame Frt. Hereinafter, measurement of a motion vector will be described. Note that the motion vector measurement unit 5 measures a motion vector using the high-layer target frame and the past frame. In the following description, the high-layer target frame and the past frame are also used as reference symbols for Frt and Frt. -I shall be used. FIG. 4 is a schematic block diagram showing the configuration of the motion vector measuring unit 5. As illustrated in FIG. 4, the motion vector measurement unit 5 includes a motion vector distribution calculation unit 51, an averaging processing unit 52, a motion vector detection unit 53, and an erroneous measurement determination unit 54. Hereinafter, each process performed by the motion vector distribution calculation unit 51, the averaging processing unit 52, the motion vector detection unit 53, and the erroneous measurement determination unit 54 of the motion vector measurement unit 5 will be described.

まず、動きベクトル分布算出部51は、対象フレームFrtと過去フレームFrt−iとの動きベクトル分布を算出する。図5は動きベクトルの分布の算出を説明するための図である。なお、図5においては、対象フレームFrtを実線で、過去フレームFrt−iを破線で示す。図5に示すように、動きベクトル計測部5は、まず対象フレームFrtと過去フレームFrt−iとを一致させ、対象フレームFrt上の各画素位置において、過去フレームFrt−iとの相関を表すスコアC0を算出する。具体的には、下記の式(1)に示すように、スコア算出の対象となる対象画素を中心とする3×3サイズのブロックB0を使用し、対象フレームFrtおよび過去フレームFrt−i上においてブロックB0をラスタスキャンさせつつ、ブロックB0同志の対応する画素値の差分値の絶対値の和(平均絶対誤差)をスコアC0として算出する。ここで、ブロックサイズは3×3に限定されるものではないが、できるだけ小さいものであることが演算量を低減することができる。なお、式(1)において、f(x+p,y+q)は対象フレームFrtの画素値を、g(x+p,y+q)は過去フレームFrt−iの画素値をそれぞれ示す。また、x,yはそれぞれx方向、y方向を示す。また、スコアC0としては平均二乗誤差を用いてもよい。

Figure 2011191972
First, the motion vector distribution calculation unit 51 calculates a motion vector distribution between the target frame Frt and the past frame Frt-i. FIG. 5 is a diagram for explaining the calculation of the motion vector distribution. In FIG. 5, the target frame Frt is indicated by a solid line, and the past frame Frt-i is indicated by a broken line. As shown in FIG. 5, the motion vector measurement unit 5 first matches the target frame Frt with the past frame Frt-i, and scores representing the correlation with the past frame Frt-i at each pixel position on the target frame Frt. C0 is calculated. Specifically, as shown in the following formula (1), a 3 × 3 block B0 centered on the target pixel for which the score is to be calculated is used, and the target frame Frt and the past frame Frt-i are used. While the block B0 is raster-scanned, the absolute value sum (average absolute error) of the difference values of the corresponding pixel values of the blocks B0 is calculated as the score C0. Here, the block size is not limited to 3 × 3, but being as small as possible can reduce the amount of calculation. In equation (1), f (x + p, y + q) represents the pixel value of the target frame Frt, and g (x + p, y + q) represents the pixel value of the past frame Frt-i. X and y indicate the x direction and the y direction, respectively. Further, a mean square error may be used as the score C0.
Figure 2011191972

なお、動画像の撮影時における露出値の変動および予期しない明るさの変更による動きベクトルの誤検出を防止するために、対象フレームFrtおよび過去フレームFrt−iにおける3×3サイズのブロック内の画素値の平均値fm,gmを算出し、平均値fm,gmを用いて下記の式(2)によりスコアC0を正規化して算出するようにしてもよい。

Figure 2011191972
It should be noted that in order to prevent erroneous detection of motion vectors due to fluctuations in exposure values and unexpected brightness changes during moving image shooting, pixels in a 3 × 3 size block in the target frame Frt and the past frame Frt-i The average value fm, gm of the value may be calculated, and the score C0 may be normalized by the following formula (2) using the average value fm, gm.
Figure 2011191972

また、上記式(1)、(2)により算出したスコアC0は、画素同志の相関が高いほど小さい値となる。本実施形態においては、入力される動画像の画素値の最大値からスコアC0を減算することにより算出したスコアC1を用いて以降の説明を行うものとする。例えば、画像画8ビットの画像である場合、C1=255−C0として算出することができる。なお、スコアC1は、画素同志の相関が高いほど大きい値となる。   Further, the score C0 calculated by the above formulas (1) and (2) becomes smaller as the correlation between the pixels is higher. In the present embodiment, the following description will be given using the score C1 calculated by subtracting the score C0 from the maximum pixel value of the input moving image. For example, when the image is an 8-bit image, it can be calculated as C1 = 255−C0. The score C1 increases as the correlation between the pixels increases.

さらに、動きベクトル分布算出部51は、対象フレームFrtに対して、過去フレームFrt−iを水平方向および垂直方向に±2画素の範囲で1画素ずつずらし、画素をずらす毎に対象フレームFrt上の各画素位置において、過去フレームFrt−iとのスコアC1を算出する。ここで、過去フレームFrt−iを対象フレームFrtに対してずらすための水平方向の座標をh、垂直方向の座標をvとすると、対象フレームFrtに対する過去フレームFrt−iの画素のずらし量は(h,v)=(k,l)(k,l=−2〜+2の整数)と表すことができる。具体的には、対象フレームFrtと過去フレームFrt−iとを一致させた場合は、(h,v)=(0,0)となり、過去フレームFrt−iを対象フレームFrtに対して水平方向に+1画素ずらした場合は(h,v)=(1,0)となる。図5には、(h,v)=(0,0)、(1,0)、(2,0)、(1,1)および(−2,−2)の場合の、対象フレームFrtに対する過去フレームFrt−iのずらし量を示す。なお、図5においては、対象フレームFrtおよび過去フレームFrt−iのずらし量は、説明のために実際のずらし量よりも大きく示している。   Further, the motion vector distribution calculation unit 51 shifts the past frame Frt-i by 1 pixel in the range of ± 2 pixels in the horizontal direction and the vertical direction with respect to the target frame Frt, and on the target frame Frt every time the pixel is shifted. At each pixel position, a score C1 with the past frame Frt-i is calculated. Here, if the horizontal coordinate for shifting the past frame Frt-i with respect to the target frame Frt is h and the vertical coordinate is v, the pixel shift amount of the past frame Frt-i with respect to the target frame Frt is ( h, v) = (k, l) (k, l = integer of −2 to +2). Specifically, when the target frame Frt and the past frame Frt-i are matched, (h, v) = (0, 0), and the past frame Frt-i is set in the horizontal direction with respect to the target frame Frt. When shifted by +1 pixel, (h, v) = (1, 0). In FIG. 5, for the target frame Frt in the case of (h, v) = (0, 0), (1, 0), (2, 0), (1, 1) and (−2, −2). The shift amount of the past frame Frt-i is shown. In FIG. 5, the shift amount of the target frame Frt and the past frame Frt-i is shown larger than the actual shift amount for the sake of explanation.

このように水平方向および垂直方向に±2画素の範囲で、対象フレームFrtに対して過去フレームFrt−iを1画素ずつずらしつつスコアC1を算出することにより、ずらし量毎に、対象フレームFrt上のすべての画素位置に各ずらし位置におけるスコアC1を割り当てたスコアC1の分布を算出することができる。ここで、スコアC1は、過去フレームFrt−iを対象フレームFrtに対してずらした場合の、対象フレームFrt上における動きベクトルと見なすことができる。このため、本実施形態においては、スコアC1の分布を動きベクトル分布Dと称する。なお、画素のずらし方は5×5=25通りあることから、25通りの動きベクトル分布D(k,l)(k,l=−2〜+2の整数)が算出されることとなる。これは、換言すれば、対象フレームFrtの各画素位置に、ずらし位置に対応した25個のスコアC1、すなわち動きベクトルが算出されていることを意味する。   Thus, by calculating the score C1 while shifting the past frame Frt-i one pixel at a time with respect to the target frame Frt within a range of ± 2 pixels in the horizontal direction and the vertical direction, the shift is performed on the target frame Frt for each shift amount. It is possible to calculate the distribution of the score C1 in which the score C1 at each shifted position is assigned to all the pixel positions. Here, the score C1 can be regarded as a motion vector on the target frame Frt when the past frame Frt-i is shifted from the target frame Frt. For this reason, in this embodiment, the distribution of the score C1 is referred to as a motion vector distribution D. Since there are 5 × 5 = 25 ways of shifting the pixels, 25 motion vector distributions D (k, l) (k, l = integer of −2 to +2) are calculated. In other words, this means that 25 scores C1, that is, motion vectors corresponding to the shifted positions are calculated at each pixel position of the target frame Frt.

平均化処理部52は、動きベクトル分布D(k,l)に対して空間的な平均化フィルタ処理を行うことにより、動きベクトル分布D(k,l)のノイズを除去して、平均化された動きベクトル分布Dm(k,l)を算出する。平均化フィルタとしては、例えば3×3のサイズのものを用いることができるが、これに限定されるものではなく、所望するノイズ除去の程度に応じて適宜設定すればよい。また、使用するフィルタは平均化フィルタに限定されるものではなく、空間的なメディアンフィルタを用いてもよい。   The averaging processing unit 52 performs a spatial averaging filter process on the motion vector distribution D (k, l), thereby removing noise of the motion vector distribution D (k, l) and averaging. The motion vector distribution Dm (k, l) is calculated. As the averaging filter, a filter having a size of 3 × 3 can be used, for example. However, the averaging filter is not limited to this, and may be appropriately set according to a desired degree of noise removal. The filter to be used is not limited to the averaging filter, and a spatial median filter may be used.

動きベクトル検出部53は、25個の動きベクトルからなる動きベクトル分布Dm(k,l)を用いて、対象フレームFrtの各画素位置における動きベクトルを検出する。以下、動きベクトルの検出について説明する。動きベクトル検出部53は、対象フレームFrtの各画素位置において、動きベクトル検出空間を設定し、動きベクトル検出空間において動きベクトルを再構成する。図6および図7は動きベクトルの再構成を説明するための図である。本実施形態においては、対象フレームFrtに対して、過去フレームFrt−iを水平方向および垂直方向に±2画素の範囲で1画素ずつずらすことにより、対象フレームFrtの各画素位置において、25個のスコアC1すなわち動きベクトルが算出されていることから、動きベクトル検出の対象となる対象画素位置において、図6に示すように5×5=25画素の動きベクトル検出空間を設定する。なお、この動きベクトル検出空間の正負の方向は、動きベクトル分布を算出した場合の画素のずらし量の方向と同様である。   The motion vector detection unit 53 detects a motion vector at each pixel position of the target frame Frt using a motion vector distribution Dm (k, l) including 25 motion vectors. Hereinafter, detection of a motion vector will be described. The motion vector detection unit 53 sets a motion vector detection space at each pixel position of the target frame Frt, and reconstructs a motion vector in the motion vector detection space. 6 and 7 are diagrams for explaining the reconstruction of the motion vector. In the present embodiment, with respect to the target frame Frt, the past frame Frt-i is shifted by one pixel within a range of ± 2 pixels in the horizontal direction and the vertical direction, thereby obtaining 25 pixels at each pixel position of the target frame Frt. Since the score C1, that is, the motion vector is calculated, a motion vector detection space of 5 × 5 = 25 pixels is set as shown in FIG. 6 at the target pixel position that is the target of motion vector detection. Note that the positive and negative directions of the motion vector detection space are the same as the direction of pixel shift when the motion vector distribution is calculated.

そして、動きベクトル検出部43は、動きベクトル検出空間における25の座標位置に、対応する画素のずらし量により算出された動きベクトル分布Dm(k,l)の、対応する画素位置のスコアC1を割り当てる。すなわち、動きベクトル検出空間の(0,0)の座標位置には、動きベクトル分布Dm(0,0)、(2,2)の座標位置には、動きベクトル分布Dm(2,2)の対象画素位置のスコアC1を割り当てる。これにより、図6に示すように、対象フレームFrtの各画素位置について、動きベクトル検出空間にスコアC1すなわち動きベクトルが割り当てられて、対象画素位置の動きベクトルが再構成される。   Then, the motion vector detection unit 43 assigns the score C1 of the corresponding pixel position of the motion vector distribution Dm (k, l) calculated based on the shift amount of the corresponding pixel to the 25 coordinate positions in the motion vector detection space. . That is, the motion vector distribution Dm (2, 2) is present at the (0, 0) coordinate position in the motion vector detection space, and the motion vector distribution Dm (2, 2) is present at the (2, 2) coordinate position. A pixel position score C1 is assigned. As a result, as shown in FIG. 6, for each pixel position of the target frame Frt, the score C1, that is, the motion vector is assigned to the motion vector detection space, and the motion vector at the target pixel position is reconstructed.

次いで、動きベクトル検出部43は、動きベクトル検出空間におけるスコアC1が最大となる座標位置を検出する。なお、スコアC1を算出した場合には、最大となる座標位置(以下、最大座標位置とする)を検出するものであり、スコアC0を算出した場合には、スコアC0が最小となる座標位置を検出するものである。そして、動きベクトル検出空間における中心座標位置(すなわち(0,0))を基準として、中心座標位置から最大座標位置へ向かうベクトルを動きベクトルとして検出する。例えば、図7に示すように動きベクトルが再構成された場合、最大座標位置は(2,2)となるため、図8に示すように、始点が(0,0)、終点が(2,2)となる動きベクトルを検出することができる。なお、動きベクトルの大きさは、中心座標位置から最大座標位置までの大きさとして検出することができる。例えば、動きベクトルの始点が(0,0)、終点が(2,2)の場合、動きベクトルの大きさは、2√2となる。   Next, the motion vector detection unit 43 detects the coordinate position where the score C1 is maximum in the motion vector detection space. When the score C1 is calculated, the maximum coordinate position (hereinafter referred to as the maximum coordinate position) is detected. When the score C0 is calculated, the coordinate position where the score C0 is minimum is determined. It is to detect. Then, with reference to the center coordinate position (that is, (0, 0)) in the motion vector detection space, a vector from the center coordinate position to the maximum coordinate position is detected as a motion vector. For example, when the motion vector is reconstructed as shown in FIG. 7, the maximum coordinate position is (2, 2), so that the start point is (0, 0) and the end point is (2, 2) as shown in FIG. 2) can be detected. The magnitude of the motion vector can be detected as the magnitude from the center coordinate position to the maximum coordinate position. For example, when the start point of the motion vector is (0, 0) and the end point is (2, 2), the magnitude of the motion vector is 2√2.

なお、検出された動きベクトルの大きさは、対象フレームFrtと過去フレームFrt−iとのフレーム間隔に応じて異なるものとなる。例えば、対象フレームFrtと過去フレームFrt−iとのフレーム間隔が1であれば、検出した動きベクトルの大きさをそのまま対象画素位置の動きベクトルの大きさとすることができる。一方、フレーム間隔が2であれば、動きベクトルの実際の大きさは、検出した動きベクトルの大きさの1/2倍、フレーム間隔が3であれば1/3倍となる。したがって、動きベクトル検出部53は、動きベクトルを検出した場合、対象フレームFrtと過去フレームFrt−iとのフレーム間隔に応じて、動きベクトルの大きさを修正する。   The magnitude of the detected motion vector differs depending on the frame interval between the target frame Frt and the past frame Frt-i. For example, if the frame interval between the target frame Frt and the past frame Frt-i is 1, the size of the detected motion vector can be directly used as the size of the motion vector at the target pixel position. On the other hand, if the frame interval is 2, the actual size of the motion vector is 1/2 times the size of the detected motion vector, and if the frame interval is 3, it is 1/3 times. Therefore, when detecting the motion vector, the motion vector detection unit 53 corrects the size of the motion vector according to the frame interval between the target frame Frt and the past frame Frt-i.

動きベクトル検出部53は、以上の処理を対象フレームFrtのすべての画素位置において行うことにより、対象フレームFrtのすべての画素位置における動きベクトルを検出する。なお、動きベクトル分布D(k,l)は、水平方向および垂直方向に±2画素の範囲で、対象フレームFrtに対して過去フレームFrt−iをずらしつつ、動きベクトルを表すスコアC1を算出することにより算出される。このため、対象フレームFrtの周囲の2画素の範囲においては、スコアC1が算出できない場合がある。したがって、動きベクトルは、対象フレームFrtの周囲2画素の範囲を除く画素位置において検出されることとなる。   The motion vector detection unit 53 detects the motion vectors at all the pixel positions of the target frame Frt by performing the above processing at all the pixel positions of the target frame Frt. Note that the motion vector distribution D (k, l) calculates a score C1 representing a motion vector while shifting the past frame Frt-i with respect to the target frame Frt within a range of ± 2 pixels in the horizontal direction and the vertical direction. Is calculated by For this reason, the score C1 may not be calculated in the range of two pixels around the target frame Frt. Therefore, the motion vector is detected at a pixel position excluding a range of two pixels around the target frame Frt.

誤計測判定部54は、動きベクトル検出部43が検出した対象フレームFrtの各画素位置における動きベクトルが誤計測であるか否かを判定する。ここで、動きベクトル検出部43が検出した動きベクトルは、動きベクトル検出空間における中心座標位置を始点、スコアC1が最大(またはスコアC0が最小)となる座標位置を終点としている。しかしながら、本実施形態においては、動きベクトル分布を算出するのに3×3という、従来のブロックマッチング法のような8×8等のブロックと比較して小さいブロックを用いているため、フレーム中のノイズにより偶然に現れた動きベクトルを検出してしまうおそれがある。また、対象フレームFrtにおける動きベクトルを検出した対象画素位置が、移動する物体ではなく、その物体の背景に対応するものである場合、動きベクトルがランダムな方向に発生するおそれがある。このような場合、検出した動きベクトルの始点の座標位置のスコアC1sと、終点の座標位置のスコアC1eとの差はそれほど大きくならない。   The erroneous measurement determination unit 54 determines whether or not the motion vector at each pixel position of the target frame Frt detected by the motion vector detection unit 43 is an erroneous measurement. Here, the motion vector detected by the motion vector detection unit 43 has a center coordinate position in the motion vector detection space as a start point and a coordinate position where the score C1 is maximum (or the score C0 is minimum) as an end point. However, in the present embodiment, 3 × 3, which is a smaller block than the 8 × 8 block as in the conventional block matching method, is used to calculate the motion vector distribution. There is a risk of detecting a motion vector that appears by chance due to noise. In addition, when the target pixel position where the motion vector in the target frame Frt is detected is not a moving object but corresponds to the background of the object, the motion vector may be generated in a random direction. In such a case, the difference between the score C1s of the start position of the detected motion vector and the score C1e of the end position is not so large.

このため、誤計測判定部54は、対象フレームFrtにおける誤計測の判定の対象となる対象画素位置について、検出した動きベクトルの始点の座標位置のスコアC1sと、終点の座標位置のスコアC1eとの関係が、C1s>C1e・αの場合に、検出した動きベクトルを誤計測されたものと判定し、対象画素位置の動きベクトルは計測されなかったとの判定結果を出力する。一方、C1s≦C1e・αの場合には、検出した動きベクトルは真の動きベクトルであると判定し、その動きベクトルを対象画素位置の判定結果として出力する。なお、動きベクトルが誤計測であると判定された対象画素位置については、動きベクトルが0であるとの判定結果を出力してもよい。ここで、係数αの値は、要求される計測精度に応じて設定すればよく、例えば0.99等の値を用いることができるが、これに限定されるものではない。   For this reason, the erroneous measurement determination unit 54 calculates the coordinates C1s of the coordinate position of the start point of the detected motion vector and the score C1e of the coordinate position of the end point for the target pixel position that is the target of the erroneous measurement determination in the target frame Frt. When the relationship is C1s> C1e · α, it is determined that the detected motion vector has been erroneously measured, and a determination result that the motion vector at the target pixel position has not been measured is output. On the other hand, if C1s ≦ C1e · α, it is determined that the detected motion vector is a true motion vector, and the motion vector is output as a determination result of the target pixel position. Note that, for the target pixel position where the motion vector is determined to be erroneous measurement, a determination result that the motion vector is 0 may be output. Here, the value of the coefficient α may be set according to the required measurement accuracy. For example, a value such as 0.99 can be used, but is not limited thereto.

なお、検出した動きベクトルの始点の座標位置のスコアC1sと、終点の座標位置のスコアC1eとの関係が、C1e>C1s>C1e・αの場合に、検出した動きベクトルを誤計測されたものと判定するようにしてもよい。   The detected motion vector is erroneously measured when the relationship between the score C1s of the coordinate position of the start point of the detected motion vector and the score C1e of the coordinate position of the end point is C1e> C1s> C1e · α. You may make it determine.

一方、上記実施形態においては、対象フレームFrtに対して過去フレームFrt−iをずらしつつ、動きベクトルを表すスコアC1を算出することにより動きベクトル分布D(k,l)を算出しているが、逆に過去フレームFrt−iに対して対象フレームFrtをずらしつつ動きベクトル分布を算出して、対象フレームFrtの各画素位置における動きベクトルを検出する場合を考える。なお、以降では説明のために、対象フレームFrtに対して過去フレームFrt−iをずらした場合に検出した動きベクトルを第1の動きベクトル、過去フレームFrt−iに対して対象フレームFrtをずらした場合に検出した動きベクトルを第2の動きベクトルと称する。この場合、第1および第2の動きベクトルが誤計測されたものでない場合、第1および第2の動きベクトルの大きさは一致し、第1の動きベクトルの方向と第2の動きベクトルの方向とは逆となる。しかしながら、第1および第2の動きベクトルが誤計測されたものである場合、第1および第2の動きベクトルの大きさは一致しないか、または第2の動きベクトルの方向が第1の動きベクトルの方向とは逆にならないものとなる。   On the other hand, in the above embodiment, the motion vector distribution D (k, l) is calculated by calculating the score C1 representing the motion vector while shifting the past frame Frt-i with respect to the target frame Frt. Conversely, consider a case where a motion vector distribution is calculated while shifting the target frame Frt with respect to the past frame Frt-i, and a motion vector at each pixel position of the target frame Frt is detected. In the following, for the sake of explanation, the motion vector detected when the past frame Frt-i is shifted with respect to the target frame Frt is the first motion vector, and the target frame Frt is shifted with respect to the past frame Frt-i. The motion vector detected in this case is referred to as a second motion vector. In this case, when the first and second motion vectors are not erroneously measured, the magnitudes of the first and second motion vectors match, and the direction of the first motion vector and the direction of the second motion vector The opposite is true. However, when the first and second motion vectors are erroneously measured, the magnitudes of the first and second motion vectors do not match, or the direction of the second motion vector is the first motion vector. It will not be the opposite of the direction.

このため、誤計測判定部54において、図9に示すように、過去フレームFrt−iに対して対象フレームFrtをずらしつつ、動きベクトル分布を算出することにより、第2の動きベクトルを検出し、対象フレームFrtの対象画素位置における第1および第2の動きベクトルのそれぞれの始点および終点の画素位置を判定し、第1の動きベクトルの始点と第2の動きベクトルの終点とが一致し、かつ第1の動きベクトルの終点と第2の動きベクトルの始点とが一致する場合に、第1の動きベクトルを真の動きベクトルであると判定し、それ以外の場合には、第1の動きベクトルは誤計測であると判定するようにしてもよい。   Therefore, the erroneous measurement determination unit 54 detects the second motion vector by calculating the motion vector distribution while shifting the target frame Frt with respect to the past frame Frt-i, as shown in FIG. Determining the pixel positions of the start and end points of the first and second motion vectors at the target pixel position of the target frame Frt, the start point of the first motion vector and the end point of the second motion vector match, and When the end point of the first motion vector coincides with the start point of the second motion vector, the first motion vector is determined to be a true motion vector, otherwise, the first motion vector May be determined to be erroneous measurement.

なお、対象フレームFrtと過去フレームFrt−iとの間において移動する物体は、必ずしも1画素単位で移動するものではなく、1画素未満の単位で移動する場合もある。例えば、過去フレームFrt−iに含まれる移動する物体は、対象フレームFrtにおいては、過去フレームFrt−iの位置から、1.5画素ずれるというように、いわゆるサブピクセル単位で移動する場合がある。このような場合、対象画素位置が真に移動している物体に対応するものであっても、その対象画素位置において計測した第2の動きベクトルの始点および終点のそれぞれの画素位置は、第1の動きベクトルの終点および始点の画素位置と完全に一致しない。このため、誤計測判定部54は、第1および第2の動きベクトルを用いて誤計測を判定する場合、第2の動きベクトルの終点座標位置と第1の動きベクトルの始点座標位置との差が、水平および垂直方向に±1画素の範囲にあれば、第2の動きベクトルの大きさは第1の動きベクトルの大きさと一致するものであると判定するようにしてもよい。これにより、真の動きベクトルが誤計測であると判定される可能性を低減することができる。   Note that an object that moves between the target frame Frt and the past frame Frt-i does not necessarily move in units of one pixel, and may move in units of less than one pixel. For example, the moving object included in the past frame Frt-i may move in so-called sub-pixel units such that the object frame Frt is shifted by 1.5 pixels from the position of the past frame Frt-i. In such a case, even if the target pixel position corresponds to an object that is truly moving, the respective pixel positions of the start point and end point of the second motion vector measured at the target pixel position are the first The pixel positions of the end point and start point of the motion vector are not completely coincident. Therefore, when the erroneous measurement determination unit 54 determines the erroneous measurement using the first and second motion vectors, the difference between the end point coordinate position of the second motion vector and the start point coordinate position of the first motion vector. However, if it is in the range of ± 1 pixel in the horizontal and vertical directions, it may be determined that the magnitude of the second motion vector matches the magnitude of the first motion vector. As a result, the possibility that the true motion vector is determined to be erroneous measurement can be reduced.

また、対象フレームFrtに対して対象フレームFrt自身をずらしつつ、上記と同様に相関が高いほど値が大きくなるスコアを算出することにより動きベクトル分布を算出することを考える。なお、このようにして算出される動きベクトル分布を自己動きベクトル分布と称するものとする。また、自己動きベクトル分布のスコアをC1′とする。図10に示すように、対象フレームFrtに移動する物体20が含まれる場合、重なっている対象フレームFrt同士をずらすと、物体20の位置もずれる。したがって、上記と同様に25通りの自己動きベクトル分布を算出し、物体20に対応する対象画素位置の動きベクトル検出空間に、自己動きベクトル分布のスコアC1′を割り当てた場合、図11に示すように、中心座標位置(0,0)のスコアC1′は大きくなるが、それ以外の座標位置のスコアC1′は中心座標位置(0,0)から離れるほど小さくなる。   Further, it is assumed that the motion vector distribution is calculated by calculating a score that increases as the correlation increases, while shifting the target frame Frt itself with respect to the target frame Frt. The motion vector distribution calculated in this way is referred to as a self-motion vector distribution. The score of the self motion vector distribution is C1 ′. As shown in FIG. 10, when the moving object 20 is included in the target frame Frt, the position of the object 20 is also shifted when the overlapping target frames Frt are shifted. Accordingly, when 25 types of self-motion vector distributions are calculated in the same manner as described above, and the self-motion vector distribution score C1 ′ is assigned to the motion vector detection space at the target pixel position corresponding to the object 20, as shown in FIG. In addition, the score C1 ′ at the center coordinate position (0,0) increases, but the score C1 ′ at other coordinate positions decreases as the distance from the center coordinate position (0,0) increases.

逆に、物体20の単調背景に対応する対象画素位置の動きベクトル検出空間に、自己動きベクトル分布のスコアC1′を割り当てた場合、対象画素位置の周囲の画素位置の画素値は対象画素位置の画素値とそれほど変わらないため、動きベクトル検出空間の座標位置に拘わらず、スコアC1′は比較的大きいものとなる。   Conversely, when the self-motion vector distribution score C1 ′ is assigned to the motion vector detection space at the target pixel position corresponding to the monotonous background of the object 20, the pixel values around the target pixel position are the pixel values of the target pixel position. Since it is not so different from the pixel value, the score C1 ′ is relatively large regardless of the coordinate position of the motion vector detection space.

ここで、自己動きベクトル分布において、中心座標位置(0,0)以外の座標位置においてスコアC1′が大きくなるということは、その大きいスコアとなった座標位置において誤計測が起こっている可能性が高いということである。したがって、自己動きベクトル分布において、検出した動きベクトルの終点位置に対応する位置におけるスコアC1′の値に応じて、検出した動きベクトルが誤計測であるか否かを判定することができる。   Here, in the self-motion vector distribution, when the score C1 ′ becomes large at a coordinate position other than the center coordinate position (0, 0), there is a possibility that an erroneous measurement has occurred at the coordinate position having the large score. It is expensive. Therefore, in the self-motion vector distribution, it can be determined whether or not the detected motion vector is an erroneous measurement according to the value of the score C1 ′ at the position corresponding to the end position of the detected motion vector.

このため、誤計測判定部54は、自己動きベクトル分布を算出し、対象画素位置の動きベクトル検出空間に自己動きベクトル分布のスコアC1′を割り当て、対象画素位置の動きベクトルの終点となる動きベクトル検出空間上の座標位置における自己動きベクトル分布のスコアC1′を測定する。そして、測定したスコアC1′を所定のしきい値Th1と比較し、スコアC1′がしきい値Th1未満である場合に、動きベクトルを真の動きベクトルであると判定し、スコアC1′がしきい値Th1以上である場合に、動きベクトルは誤計測であると判定するようにしてもよい。これにより、上記実施形態と同様に、動きベクトルの誤計測を判定することができる。   Therefore, the erroneous measurement determination unit 54 calculates the self-motion vector distribution, assigns the self-motion vector distribution score C1 ′ to the motion vector detection space at the target pixel position, and the motion vector that is the end point of the motion vector at the target pixel position. The self-motion vector distribution score C1 ′ at the coordinate position in the detection space is measured. Then, the measured score C1 ′ is compared with a predetermined threshold value Th1, and when the score C1 ′ is less than the threshold value Th1, it is determined that the motion vector is a true motion vector. If the threshold value is equal to or greater than Th1, the motion vector may be determined to be erroneous measurement. Thereby, the erroneous measurement of a motion vector can be determined similarly to the said embodiment.

また、機械学習を用いて生成された、動きベクトルが真の動きベクトルであるか否かを判定する判別器を用いて、動きベクトルが真の動きベクトルであるか否かを判定するようにしてもよい。この場合、判別器は、動きベクトルが真の動きベクトルである動きベクトル検出空間のスコア分布を正の教師データ、動きベクトルが誤検出である動きベクトル検出空間のスコア分布を負の教師データとして使用して学習を行うことにより作成すればよい。   In addition, it is possible to determine whether or not the motion vector is a true motion vector by using a discriminator that determines whether or not the motion vector is a true motion vector, which is generated using machine learning. Also good. In this case, the discriminator uses the score distribution in the motion vector detection space in which the motion vector is a true motion vector as positive teacher data, and the score distribution in the motion vector detection space in which the motion vector is false detection as negative teacher data. And can be created by learning.

メモリ6は、間隔パラメータ設定部4が設定した間隔パラメータを記憶する。   The memory 6 stores the interval parameter set by the interval parameter setting unit 4.

制御部7は、階層化部3、間隔パラメータ設定部4および動きベクトル計測部5の動作を制御する。   The control unit 7 controls the operations of the hierarchization unit 3, the interval parameter setting unit 4, and the motion vector measurement unit 5.

次いで、本実施形態の動作について説明する。図12は本実施形態において行われる処理を示すフローチャートである。なお、本実施形態においては、連続して入力されるフレーム毎に動きベクトルを計測するに際し、フレームの画素毎に間隔パラメータを設定するものであるが、1回目の動きベクトルの計測時には、フレーム内の各画素の動きベクトルが分からないため間隔パラメータを設定できない。このため、本実施形態においては、1回目の動きベクトルの計測時においては、間隔パラメータを使用せず、すべての過去フレームFrt−iと対象フレームFrtとの間で動きベクトル分布を算出して、動きベクトルを計測して間隔パラメータを設定するものとする。なお、図12に示すフローチャートにおいては、1回目の動きベクトルの計測が終了し、動きベクトルに基づいて対象フレームFrtの画素毎に間隔パラメータが設定されてメモリ6に記憶されているものとする。   Next, the operation of this embodiment will be described. FIG. 12 is a flowchart showing processing performed in the present embodiment. In this embodiment, when measuring a motion vector for each frame that is continuously input, an interval parameter is set for each pixel of the frame. Since the motion vector of each pixel is unknown, the interval parameter cannot be set. For this reason, in the present embodiment, at the time of measuring the first motion vector, the motion parameter distribution is calculated between all past frames Frt-i and the target frame Frt without using the interval parameter. Assume that a motion vector is measured and an interval parameter is set. In the flowchart shown in FIG. 12, it is assumed that the measurement of the first motion vector is completed, and an interval parameter is set for each pixel of the target frame Frt and stored in the memory 6 based on the motion vector.

不図示の画像入力装置からフレームメモリ2に対象フレームFrtおよび処理に必要な数の過去フレームFrt−iが記憶されると(ステップST1)、階層化部3が、対象フレームFrtおよび過去フレームFrt−iを階層化する(ステップST2)。なお、現在の対象フレームFrtについての動きベクトル計測の処理が終了した後には、次の対象フレームについて動きベクトル計測の処理が行われるが、その場合、階層化部3は次の対象フレームのみ階層化すればよいこととなる。   When the target frame Frt and the number of past frames Frt-i necessary for processing are stored in the frame memory 2 from an image input device (not shown) (step ST1), the hierarchizing unit 3 determines that the target frame Frt and the past frame Frt- i is hierarchized (step ST2). Note that, after the motion vector measurement process for the current target frame Frt is completed, the motion vector measurement process is performed for the next target frame. In this case, the hierarchization unit 3 hierarchizes only the next target frame. It will do.

次いで、動きベクトル計測部5が、高階層の対象フレームFrtにおける全画素位置の間隔パラメータをメモリ6から読み出し(ステップST3)、さらに対象フレームFrtおよび対象フレームFrtに時間的に最も近い過去フレームFrt−iをフレームメモリ2から読み出す(ステップST4)。そして、制御部7が高階層の対象フレームFrtにおける動きベクトル計測の対象となる対象画素位置を初期位置に設定する(ステップST5)。なお、初期位置としては、例えば対象フレームFrtの左上隅の画素位置を用いることができる。   Next, the motion vector measuring unit 5 reads out the interval parameters of all pixel positions in the higher-layer target frame Frt from the memory 6 (step ST3), and further, the target frame Frt and the past frame Frt− closest to the target frame Frt in time. i is read from the frame memory 2 (step ST4). And the control part 7 sets the object pixel position used as the object of the motion vector measurement in the object frame Frt of a high hierarchy to an initial position (step ST5). As the initial position, for example, the pixel position at the upper left corner of the target frame Frt can be used.

次いで、制御部7は、対象画素位置の間隔パラメータを参照し、対象画素位置が、対象フレームFrtと現在読み出している過去フレーム(現在の過去フレームとする)Frt−iとを用いて動きベクトルを計測する画素位置であるか否かを判定する(ステップST6)。ステップST6が肯定されると、制御部7はさらに対象画素位置について動きベクトルがすでに計測されているか否かを判定する(ステップST7)。ステップST7が否定されると、動きベクトル計測部5が対象フレームFrtおよび現在の過去フレームFrt−iを用いて対象画素位置の動きベクトルの計測を行う(ステップST8)。動きベクトルの計測処理については後述する。ステップST8に続いて、およびステップST6が否定される、あるいはステップST7が肯定されると、制御部7は、対象画素位置が対象フレームFrtの最終画素位置であるか否かを判定する(ステップST9)。ステップST9が否定されると、対象画素位置を次の画素位置に変更し(ステップST10)、ステップST6に戻り、ステップST6以降の処理を繰り返す。   Next, the control unit 7 refers to the interval parameter of the target pixel position, and the target pixel position is determined by using the target frame Frt and the past frame (currently past frame) Frt-i that is currently read out. It is determined whether or not the pixel position is to be measured (step ST6). If step ST6 is affirmed, the control unit 7 further determines whether or not a motion vector has already been measured for the target pixel position (step ST7). If step ST7 is negative, the motion vector measuring unit 5 measures the motion vector at the target pixel position using the target frame Frt and the current past frame Frt-i (step ST8). The motion vector measurement process will be described later. Subsequent to step ST8 and when step ST6 is denied or step ST7 is affirmed, the control unit 7 determines whether or not the target pixel position is the final pixel position of the target frame Frt (step ST9). ). If step ST9 is negative, the target pixel position is changed to the next pixel position (step ST10), the process returns to step ST6, and the processes after step ST6 are repeated.

ステップST9が肯定されると、制御部7は、間隔パラメータにより表されるすべてのフレーム数の過去フレームFrt−iを用いて動きベクトルを計測したか否かを判定する(ステップST11)。ステップST11が否定されると、過去フレームFrt−iを次の過去フレームに変更するとともに、変更した過去フレームをフレームメモリ2から読み出し(ステップST12)、ステップST5に戻り、ステップST6以降の処理を繰り返す。   If step ST9 is affirmed, the control unit 7 determines whether or not the motion vector has been measured using the past frames Frt-i of all the frames represented by the interval parameter (step ST11). If step ST11 is negative, the past frame Frt-i is changed to the next past frame, the changed past frame is read from the frame memory 2 (step ST12), the process returns to step ST5, and the processes after step ST6 are repeated. .

一方、ステップST11が肯定された場合は、動きベクトル計測部5は、動きベクトルの計測結果を出力する(ステップST13)。なお、動きベクトルが計測された場合には、計測された動きベクトルを出力し、動きベクトルが計測されなかった場合には、動きベクトルが計測されなかった旨の計測結果、あるいは大きさが0の動きベクトルを出力する。   On the other hand, when step ST11 is affirmed, the motion vector measurement part 5 outputs the measurement result of a motion vector (step ST13). When the motion vector is measured, the measured motion vector is output. When the motion vector is not measured, the measurement result indicating that the motion vector is not measured or the size is 0. Output motion vector.

以上の処理を具体的に説明すると、動きベクトル計測部5は、過去フレームFrt−iについて、対象フレームFrtの全画素についての間隔パラメータを参照して、動きベクトルを計測する。例えば過去フレームがFrt−1である場合、間隔パラメータによりフレーム間隔が1に設定されている画素位置においてのみ動きベクトルを計測する。そして、過去フレームFrt−iを次の過去フレームに変更し、次の過去フレームFrt−iについて、対象フレームFrtの全画素についての間隔パラメータを参照して、動きベクトルを計測する。   The above processing will be specifically described. The motion vector measuring unit 5 measures a motion vector for the past frame Frt-i with reference to the interval parameters for all the pixels of the target frame Frt. For example, when the past frame is Frt-1, the motion vector is measured only at the pixel position where the frame interval is set to 1 by the interval parameter. Then, the past frame Frt-i is changed to the next past frame, and the motion vector is measured for the next past frame Frt-i with reference to the interval parameters for all the pixels of the target frame Frt.

なお、本実施形態においては、対象画素位置が間隔パラメータにより動きベクトルを計測する画素位置である場合であっても、対象画素位置において動きベクトルがすでに計測されている場合には、動きベクトルは計測されないこととなる。例えば、対象画素位置の間隔パラメータにより規定される過去フレームFrt−iが、例えばFrt−1〜Frt−3の3つある場合において、対象フレームFrtと過去フレームFrt−1とを用いて動きベクトルが計測された場合、残りの過去フレームFrt−2,Frt−3については動きベクトルは計測されない。一方、動きベクトルが計測されていなければ、対象フレームFrtと過去フレームFrt−2を用いて動きベクトルを計測する。動きベクトルが計測されれば、残りの過去フレームFrt−3については動きベクトルは計測されない。このように、動きベクトルが計測された場合には、間隔パラメータにより表されるすべての過去フレームFrt−iについて動きベクトルを計測しないようにすることにより、演算量を低減して処理を高速に行うことができる。   In the present embodiment, even when the target pixel position is a pixel position at which a motion vector is measured by the interval parameter, if the motion vector has already been measured at the target pixel position, the motion vector is measured. Will not be. For example, when there are three past frames Frt-i defined by the interval parameter of the target pixel position, for example, Frt-1 to Frt-3, the motion vector is determined using the target frame Frt and the past frame Frt-1. When measured, no motion vector is measured for the remaining past frames Frt-2 and Frt-3. On the other hand, if the motion vector is not measured, the motion vector is measured using the target frame Frt and the past frame Frt-2. If the motion vector is measured, the motion vector is not measured for the remaining past frame Frt-3. As described above, when a motion vector is measured, the motion vector is not measured for all past frames Frt-i represented by the interval parameter, thereby reducing the amount of calculation and performing processing at high speed. be able to.

一方、ステップST13に続いて、間隔パラメータ設定部4が、動きベクトルの計測結果に基づいて対象画素位置の間隔パラメータを更新する(ステップST14)。以下、間隔パラメータの更新について説明する。   On the other hand, following step ST13, the interval parameter setting unit 4 updates the interval parameter of the target pixel position based on the measurement result of the motion vector (step ST14). Hereinafter, the update of the interval parameter will be described.

図13は間隔パラメータの更新を説明するための図である。なお、ここでは、処理前の対象画素位置の間隔パラメータにより規定される過去フレームFrt−iが例えば、Frt−3〜Frt−5の3つである場合について説明する。なお、この場合、間隔パラメータにより規定されるフレーム間隔は3であり、フレーム数は3である。動きベクトルが過去フレームFrt−3を用いた処理により計測された場合には、先の間隔パラメータ設定時よりも対象画素位置の物体の移動速度が速まっている可能性があることから、先に設定された間隔パラメータよりも、フレーム間隔を1つ少なくする。また、フレーム間隔を1つ少なくすることにより、フレーム間隔が2となることから使用する過去フレームのフレーム数を2とする。したがって、間隔パラメータ設定部4は、フレーム間隔が2、フレーム数が2となるように間隔パラメータを更新する。これにより、次回の処理においては、過去フレームFrt−2,Frt−3が使用されることとなる。   FIG. 13 is a diagram for explaining the update of the interval parameter. Here, a case will be described in which the past frames Frt-i defined by the interval parameter of the target pixel position before processing are, for example, three of Frt-3 to Frt-5. In this case, the frame interval defined by the interval parameter is 3, and the number of frames is 3. When the motion vector is measured by processing using the past frame Frt-3, the moving speed of the object at the target pixel position may be faster than when the interval parameter is set earlier. One frame interval is made smaller than the set interval parameter. Further, since the frame interval becomes 2 by reducing the frame interval by 1, the number of past frames to be used is set to 2. Therefore, the interval parameter setting unit 4 updates the interval parameter so that the frame interval is 2 and the number of frames is 2. Thereby, in the next process, the past frames Frt-2 and Frt-3 are used.

一方、動きベクトルが過去フレームFrt−5を用いた処理により計測された場合には、先の間隔パラメータ設定時よりも対象画素位置の物体の移動速度が遅くなっている可能性があることから、先に設定された間隔パラメータよりも、フレーム間隔を1つ多くする。また、フレーム間隔を1つ多くすることにより、フレーム間隔が4となることから、使用する過去フレーム数は3のままである。したがって、間隔パラメータ設定部4は、フレーム間隔が4、フレーム数が3となるように間隔パラメータを更新する。これにより、次回の処理においては、過去フレームFrt−4,Frt−5、Frt−6が使用されることとなる。   On the other hand, when the motion vector is measured by the process using the past frame Frt-5, there is a possibility that the moving speed of the object at the target pixel position is slower than when the previous interval parameter is set. The frame interval is increased by one more than the previously set interval parameter. Further, since the frame interval becomes 4 by increasing the frame interval by one, the number of past frames to be used remains three. Therefore, the interval parameter setting unit 4 updates the interval parameter so that the frame interval is 4 and the number of frames is 3. Thereby, in the next process, the past frames Frt-4, Frt-5, and Frt-6 are used.

また、いずれの過去フレームを用いても動きベクトルが計測されなかった場合には、使用する過去フレーム数を1つ多くする。したがって、間隔パラメータ設定部4は、フレーム間隔が3、フレーム数が4となるように間隔パラメータを更新する。これにより、次回の処理においては、過去フレームFrt−3,Frt−4,Frt−5、Frt−6が使用されることとなる。なお、使用する過去フレーム数を多くすると、演算量が多くなることから、使用する過去フレーム数の最大値を例えば4に設定しておくことが好ましい。なお、定期的に間隔パラメータを初期値(例えばフレーム間隔2、フレーム数3)にリセットするようにしてもよい。   If no motion vector is measured using any past frame, the number of past frames used is increased by one. Therefore, the interval parameter setting unit 4 updates the interval parameter so that the frame interval is 3 and the number of frames is 4. Thus, in the next process, the past frames Frt-3, Frt-4, Frt-5, and Frt-6 are used. Note that if the number of past frames to be used is increased, the amount of calculation increases. Therefore, it is preferable to set the maximum number of past frames to be used to, for example, 4. The interval parameter may be periodically reset to an initial value (for example, frame interval 2 and frame number 3).

さらに、計測された動きベクトルが0であった場合には、フレーム間隔を6とし、動きベクトルが計測されるまで、過去フレームFrt−6から過去フレームFrt−1まで順次使用して動きベクトルの計測を行うように、間隔パラメータを設定する。この場合、過去フレームFrt−6を用いて動きベクトルが計測されれば、そこで動きベクトルの計測を終了し、動きベクトルが計測されなければ、次に過去フレームFrt−5を用いて動きベクトルを計測し、以下順次過去フレームFrt−4〜Frt−1を用いて動きベクトルが計測されるまで、動きベクトルの計測を行うこととなる。   Further, when the measured motion vector is 0, the frame interval is set to 6, and the motion vector is measured by sequentially using the past frame Frt-6 to the past frame Frt-1 until the motion vector is measured. Set the interval parameter to In this case, if the motion vector is measured using the past frame Frt-6, the measurement of the motion vector is ended there. If the motion vector is not measured, the motion vector is measured using the past frame Frt-5. Thereafter, the motion vector is measured until the motion vector is sequentially measured using the past frames Frt-4 to Frt-1.

なお、本実施形態においては、6つの過去フレームFrt−1〜Frt−6を使用して動きベクトルを計測するものであるため、Frt−6以降の過去フレームは使用されない。このため、本実施形態においては、Frt−6以降の過去フレームを使用しないように間隔パラメータにおけるフレーム間隔の上限値が設定されている。上述したように本実施形態においては、使用する過去フレームのフレーム数の最大値は4であるため、フレーム間隔の上限値は4に設定されている。したがって、処理前の対象画素位置の間隔パラメータにより規定される過去フレームFrt−iが例えば、Frt−4〜Frt−6の場合において、動きベクトルが計測されなかった場合には、実質的には間隔パラメータは更新されないこととなる。   In this embodiment, since the motion vector is measured using the six past frames Frt-1 to Frt-6, the past frames after Frt-6 are not used. For this reason, in this embodiment, the upper limit value of the frame interval in the interval parameter is set so as not to use past frames after Frt-6. As described above, in the present embodiment, since the maximum value of the number of past frames to be used is 4, the upper limit value of the frame interval is set to 4. Therefore, in the case where the past frame Frt-i defined by the interval parameter of the target pixel position before processing is, for example, Frt-4 to Frt-6, if the motion vector is not measured, the interval is substantially reduced. The parameter will not be updated.

ステップST14に続いて、次の対象フレームについて動きベクトルを計測すべく、制御部7は対象フレームFrtを次のフレームに変更し(t=t+1、ステップST15)、ステップST2に戻る。なお、ステップST2においては、次の対象フレームのみが階層化されることとなる。   Subsequent to step ST14, in order to measure a motion vector for the next target frame, the control unit 7 changes the target frame Frt to the next frame (t = t + 1, step ST15), and returns to step ST2. In step ST2, only the next target frame is hierarchized.

図14は動きベクトルの計測処理のフローチャートである。動きベクトル計測部5の動きベクトル分布算出部51は、対象フレームFrtと過去フレームFrt−iとのずらし量を初期値(例えば(h,v)=(0,0))に設定し(ステップST21)、動きベクトル分布Dを算出する(ステップST22)。そして、対象フレームFrtと過去フレームFrt−iとのすべてのずらし量について動きベクトル分布を算出したか否かを判定し(ステップST23)、ステップST23が否定されるとずらし量を変更し(ステップST24)、ステップST22に戻る。ステップST23が肯定されると、平均化処理部52が、算出した動きベクトル分布Dに対して平均化処理を施す(ステップST25)。   FIG. 14 is a flowchart of the motion vector measurement process. The motion vector distribution calculating unit 51 of the motion vector measuring unit 5 sets the shift amount between the target frame Frt and the past frame Frt-i to an initial value (for example, (h, v) = (0, 0)) (step ST21). ) To calculate the motion vector distribution D (step ST22). Then, it is determined whether or not the motion vector distribution has been calculated for all the shift amounts of the target frame Frt and the past frame Frt-i (step ST23). If step ST23 is negative, the shift amount is changed (step ST24). ), The process returns to step ST22. If step ST23 is positive, the averaging processing unit 52 performs an averaging process on the calculated motion vector distribution D (step ST25).

続いて、動きベクトル検出部53が動きベクトルを検出し(ステップST26)、さらに誤計測判定部54が動きベクトルの誤計測を判定し(ステップST27)、動きベクトル計測処理を終了する。   Subsequently, the motion vector detection unit 53 detects the motion vector (step ST26), and the erroneous measurement determination unit 54 determines the erroneous measurement of the motion vector (step ST27), and the motion vector measurement process ends.

このように、本実施形態においては、対象フレームFrt上における画素毎に、動きベクトルを計測する際の対象フレームFrtと過去フレームFrt−iとのフレーム間隔を表す間隔パラメータを設定し、間隔パラメータにしたがって動きベクトルを計測するようにしたものである。このため、フレーム中の物体の移動速度に応じた適切なフレーム間隔を設定することができ、その結果、物体の移動速度に拘わらず、精度よく動きベクトルを計測することができる。   As described above, in the present embodiment, for each pixel on the target frame Frt, the interval parameter indicating the frame interval between the target frame Frt and the past frame Frt-i when measuring the motion vector is set, and the interval parameter is set as the interval parameter. Therefore, the motion vector is measured. Therefore, an appropriate frame interval can be set according to the moving speed of the object in the frame, and as a result, the motion vector can be measured with high accuracy regardless of the moving speed of the object.

また、対象フレームFrtおよび過去フレームFrt−iを階層化し、最低階層以外の階層すなわち低解像度の対象フレームFrt上における画素毎に間隔パラメータを設定するようにしたため、演算量を低減して高速に動きベクトルを計測することができる。また、高階層のフレームを用いると、移動速度が小さい物体の動きベクトルの検出精度が低下するが、本実施形態によれば、フレーム中の物体の移動速度に応じた適切なフレーム間隔を設定しているため、物体の移動速度に拘わらず、精度よくかつ高速に動きベクトルを計測することができる。   In addition, the target frame Frt and the past frame Frt-i are hierarchized, and the interval parameter is set for each pixel on a layer other than the lowest layer, that is, the low-resolution target frame Frt. Vectors can be measured. In addition, when a high-level frame is used, the accuracy of detecting a motion vector of an object having a low moving speed is lowered. According to this embodiment, an appropriate frame interval is set according to the moving speed of the object in the frame. Therefore, it is possible to measure the motion vector with high accuracy and high speed regardless of the moving speed of the object.

また、動きベクトルの大きさが小さいほど、対象フレームFrtと過去フレームFrt−iとの間隔が大きくなるように間隔パラメータを変更することにより、移動速度が小さい物体についての動きベクトル、および移動速度が大きい物体についての動きベクトルの双方を精度よく検出することができる。   In addition, by changing the interval parameter so that the interval between the target frame Frt and the past frame Frt-i becomes larger as the size of the motion vector is smaller, the motion vector and the movement velocity for an object with a lower movement velocity are obtained. Both motion vectors for a large object can be accurately detected.

また、複数の過去フレームを用いることにより動きベクトルを確実に計測できるが、その際に複数の過去フレームについて、対象フレームに近いフレーム間隔の過去フレームから順に用いて動きベクトルを計測し、0以外の値の動きベクトルが計測されると、それ以降の過去フレームを用いての動きベクトルの計測を停止しているため、複数フレームのすべてについて動きベクトルを計測しなくてもよくなり、その結果、処理速度を向上させることができる。なお、対象フレームから離れたフレーム間隔の過去フレームから順に用いて動きベクトルを計測するようにしてもよいことはもちろんである。   In addition, it is possible to reliably measure a motion vector by using a plurality of past frames. At that time, for a plurality of past frames, the motion vector is measured in order from a past frame having a frame interval close to the target frame. When the motion vector of the value is measured, the motion vector measurement using the past frames after that is stopped, so it is not necessary to measure the motion vector for all of the multiple frames. Speed can be improved. Of course, the motion vector may be measured in order from the past frame at a frame interval away from the target frame.

また、上記実施形態においては、対象フレームFrt上の画素毎に間隔パラメータを設定しているが、移動する物体は複数の画素からなる領域に亘って存在する。このため、対象フレームFrt上の移動する物体に対応する領域毎に間隔パラメータを設定するようにしてもよい。   In the above-described embodiment, the interval parameter is set for each pixel on the target frame Frt, but the moving object exists over a region composed of a plurality of pixels. For this reason, the interval parameter may be set for each region corresponding to the moving object on the target frame Frt.

また、上記実施形態においては、動きベクトル計測部5において動きベクトル分布を算出することにより動きベクトルを計測しているが、動きベクトルの計測手法はこれに限定されるものではなく、従来のブロックマッチング法、あるいは上記特許文献1〜特許文献4に記載された手法等、任意の手法を用いることができることはもちろんである。なお、従来のブロックマッチング法を用いる場合であっても、本実施形態においては、ブロックサイズを小さくすることができるため、演算量を低減して、高速に処理を行うことができる。   In the above embodiment, the motion vector measurement unit 5 calculates the motion vector by calculating the motion vector distribution. However, the motion vector measurement method is not limited to this, and the conventional block matching is performed. Of course, it is possible to use any method such as the method or the method described in Patent Documents 1 to 4 above. Even in the case where the conventional block matching method is used, the block size can be reduced in this embodiment, so that the amount of calculation can be reduced and processing can be performed at high speed.

また、上記実施形態においては、階層化部3において対象フレームFrtおよび過去フレームFrt−iを階層化し、高階層のフレームを用いて動きベクトルを計測しているが、対象フレームFrtおよび過去フレームFrt−iを階層化することなく、対象フレームFrtおよび過去フレームFrt−iそのものを用いて動きベクトルを計測するようにしてもよいことはもちろんである。   In the above embodiment, the hierarchizing unit 3 hierarchizes the target frame Frt and the past frame Frt-i, and measures the motion vector using a higher layer frame. However, the target frame Frt and the past frame Frt− are measured. Of course, the motion vector may be measured using the target frame Frt and the past frame Frt-i itself without hierarchizing i.

また、上記実施形態においては、対象フレームFrt上の各画素位置における動きベクトルについて、各画素位置近傍の複数画素位置の複数の動きベクトルに基づいて、対象画素位置の動きベクトルを決定するようにしてもよい。例えば、複数の画素位置の動きベクトルの平均値を対象画素位置の動きベクトルとしてもよい。これにより、動きベクトルのばらつきを抑えて、より精度よく対象画素位置の動きベクトルを計測することができる。   In the above embodiment, the motion vector at the target pixel position is determined based on a plurality of motion vectors at a plurality of pixel positions near each pixel position for the motion vector at each pixel position on the target frame Frt. Also good. For example, an average value of motion vectors at a plurality of pixel positions may be used as the motion vector at the target pixel position. As a result, the motion vector at the target pixel position can be measured with higher accuracy while suppressing variations in the motion vector.

また、上記実施形態においては、動きベクトルが計測された場合には、間隔パラメータにより表されるすべての過去フレームFrt−iについて動きベクトルを計測しないようにしているが、すべての過去フレームFrt−iについて動きベクトルを計測するようにしてもよいことはもちろんである。この場合、すべての過去フレームを用いて計測した動きベクトルの平均値を、対象画素位置の動きベクトルとすればよい。   In the above embodiment, when a motion vector is measured, the motion vector is not measured for all past frames Frt-i represented by the interval parameter. However, all past frames Frt-i are not measured. Of course, the motion vector may be measured for. In this case, an average value of motion vectors measured using all past frames may be used as the motion vector of the target pixel position.

また、上記実施形態においては、動きベクトルを計測する際に、対象フレームFrtと過去フレームFrt−iとのすらし量を±2画素としているが、これに限定されるものではなく、±1画素、あるいは±3画素等、求められる計測精度に応じてすらし量を適宜設定すればよい。   In the above embodiment, when the motion vector is measured, the amount of smoothing between the target frame Frt and the past frame Frt-i is ± 2 pixels. However, the present invention is not limited to this. Alternatively, the smoothing amount may be set as appropriate according to the required measurement accuracy, such as ± 3 pixels.

また、上記実施形態においては、動きベクトル分布Dを平均化しているが、動きベクトル分布Dを平均化することなく、動きベクトルを計測するようにしてもよいことはもちろんである。   In the above embodiment, the motion vector distribution D is averaged, but it is needless to say that the motion vector may be measured without averaging the motion vector distribution D.

以上、本発明の実施形態に係る装置1について説明したが、コンピュータを、上記の階層化部3、間隔パラメータ設定部4、動きベクトル計測部5および制御部7に対応する手段として機能させ、図12および図14に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   Although the apparatus 1 according to the embodiment of the present invention has been described above, the computer functions as means corresponding to the hierarchization unit 3, the interval parameter setting unit 4, the motion vector measurement unit 5, and the control unit 7. A program for performing the processing as shown in FIG. 12 and FIG. 14 is also one embodiment of the present invention. A computer-readable recording medium in which such a program is recorded is also one embodiment of the present invention.

1 動きベクトル計測装置
2 フレームメモリ
3 階層化部
4 間隔パラメータ設定部
5 動きベクトル計測部
51 動きベクトル分布算出部
52 平均化処理部
53 動きベクトル検出部
54 誤計測判定部
DESCRIPTION OF SYMBOLS 1 Motion vector measurement apparatus 2 Frame memory 3 Hierarchical part 4 Space | interval parameter setting part 5 Motion vector measurement part 51 Motion vector distribution calculation part 52 Averaging process part 53 Motion vector detection part 54 Incorrect measurement determination part

Claims (9)

動画像に含まれる複数フレームにおける対象フレームと、該対象フレームから所定フレーム間隔離れた過去フレームとに基づいて、前記対象フレーム上の対象画素位置での動きベクトルを計測する動きベクトル計測装置において、
前記対象フレーム上における領域毎または画素毎に、前記動きベクトルを計測する際の前記対象フレームと前記過去フレームとのフレーム間隔を表す間隔パラメータを設定する間隔パラメータ設定手段と、
前記間隔パラメータにしたがって、前記動きベクトルを計測する動きベクトル計測手段とを備えたことを特徴とする動きベクトル計測装置。
In a motion vector measurement device that measures a motion vector at a target pixel position on a target frame based on a target frame in a plurality of frames included in a moving image and a past frame that is separated from the target frame by a predetermined frame interval,
Interval parameter setting means for setting an interval parameter representing a frame interval between the target frame and the past frame when measuring the motion vector for each region or pixel on the target frame;
A motion vector measuring device comprising: motion vector measuring means for measuring the motion vector according to the interval parameter.
前記対象フレームおよび前記過去フレームを階層化する階層化手段をさらに備え、
前記間隔パラメータ変更手段は、最低階層以外の階層の前記対象フレーム上における領域毎または画素毎に前記間隔パラメータを設定する手段であることを特徴とする請求項1記載の動きベクトル計測装置。
Further comprising hierarchizing means for hierarchizing the target frame and the past frame;
2. The motion vector measuring apparatus according to claim 1, wherein the interval parameter changing unit is a unit that sets the interval parameter for each region or for each pixel on the target frame in a layer other than the lowest layer.
前記間隔パラメータを記憶する記憶手段をさらに備え、
前記間隔パラメータ設定手段は、計測された前記動きベクトルが小さいほど、前記対象フレームと前記過去フレームとの間隔が大きくなるように前記記憶手段に記憶された間隔パラメータを更新する手段であることを特徴とする請求項1または2記載の動きベクトル計測装置。
Storage means for storing the interval parameter;
The interval parameter setting unit is a unit that updates the interval parameter stored in the storage unit so that the interval between the target frame and the past frame becomes larger as the measured motion vector is smaller. The motion vector measuring device according to claim 1 or 2.
前記間隔パラメータを記憶する記憶手段をさらに備え、
前記間隔パラメータ設定手段は、前記対象画素位置および該対象画素位置近傍の複数画素位置の複数の前記動きベクトルに基づいて、前記記憶された間隔パラメータを更新する手段であることを特徴とする請求項1から3のいずれか1項記載の動きベクトル計測装置。
Storage means for storing the interval parameter;
The interval parameter setting means is means for updating the stored interval parameter based on the plurality of motion vectors at the target pixel position and a plurality of pixel positions near the target pixel position. The motion vector measuring device according to any one of 1 to 3.
前記間隔パラメータ設定手段は、前記フレーム間隔とともに、前記動きベクトルの計測に使用する前記過去フレームのフレーム数を表す前記間隔パラメータを設定する手段であることを特徴とする請求項1から4のいずれか1項記載の動きベクトル計測装置。   5. The interval parameter setting unit is a unit that sets the interval parameter that represents the number of frames of the past frame used for measurement of the motion vector together with the frame interval. The motion vector measuring device according to claim 1. 前記動きベクトル計測手段は、前記対象フレームに近いフレーム間隔の前記過去フレームから順に、あるいは前記対象フレームから離れたフレーム間隔の前記過去フレームから順に用いて前記動きベクトルを計測する手段であり、大きさが0以外の値の前記動きベクトルが計測されると、それ以降の前記過去フレームを用いての前記動きベクトルの計測を停止する手段であることを特徴とする請求項5記載の動きベクトル計測装置。   The motion vector measuring means is a means for measuring the motion vector in order from the past frame at a frame interval close to the target frame or from the past frame at a frame interval away from the target frame. 6. The motion vector measurement device according to claim 5, wherein when the motion vector having a value other than 0 is measured, the motion vector measurement unit stops measurement of the motion vector using the past frame thereafter. . 前記動きベクトル計測手段は、前記対象画素位置および該対象画素位置近傍の複数画素位置の複数の前記動きベクトルに基づいて、前記対象画素位置の動きベクトルを決定する手段であることを特徴とする請求項1から6のいずれか1項記載の動きベクトル計測装置。   The motion vector measuring means is means for determining a motion vector at the target pixel position based on the plurality of motion vectors at the target pixel position and a plurality of pixel positions in the vicinity of the target pixel position. Item 7. The motion vector measuring device according to any one of Items 1 to 6. 動画像に含まれる複数フレームにおける対象フレームと、該対象フレームから所定フレーム間隔離れた過去フレームとに基づいて、前記対象フレーム上の対象画素位置での動きベクトルを計測する動きベクトル計測方法において、
前記対象フレーム上における領域毎または画素毎に、前記動きベクトルを計測する際の前記対象フレームと前記過去フレームとのフレーム間隔を表す間隔パラメータを設定し、
前記間隔パラメータにしたがって、前記動きベクトルを計測することを特徴とする動きベクトル計測方法。
In a motion vector measurement method for measuring a motion vector at a target pixel position on the target frame based on a target frame in a plurality of frames included in the moving image and a past frame separated from the target frame by a predetermined frame interval,
For each region or pixel on the target frame, set an interval parameter representing a frame interval between the target frame and the past frame when measuring the motion vector,
A motion vector measuring method comprising measuring the motion vector according to the interval parameter.
動画像に含まれる複数フレームにおける対象フレームと、該対象フレームから所定フレーム間隔離れた過去フレームとに基づいて、前記対象フレーム上の対象画素位置での動きベクトルを計測する動きベクトル計測方法をコンピュータに実行させるためのプログラムにおいて、
前記プログラムは、前記対象フレーム上における領域毎または画素毎に、前記動きベクトルを計測する際の前記対象フレームと前記過去フレームとのフレーム間隔を表す間隔パラメータを設定する手順と、
前記間隔パラメータにしたがって、前記動きベクトルを計測する手順とをコンピュータに実行させることを特徴とするプログラム。
A motion vector measuring method for measuring a motion vector at a target pixel position on a target frame based on a target frame in a plurality of frames included in the moving image and a past frame separated from the target frame by a predetermined frame interval In the program to be executed,
The program sets, for each region or pixel on the target frame, a procedure for setting an interval parameter representing a frame interval between the target frame and the past frame when measuring the motion vector;
A program for causing a computer to execute a procedure for measuring the motion vector according to the interval parameter.
JP2010056971A 2010-03-15 2010-03-15 Device and method for measurement of motion vector Abandoned JP2011191972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010056971A JP2011191972A (en) 2010-03-15 2010-03-15 Device and method for measurement of motion vector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010056971A JP2011191972A (en) 2010-03-15 2010-03-15 Device and method for measurement of motion vector

Publications (1)

Publication Number Publication Date
JP2011191972A true JP2011191972A (en) 2011-09-29

Family

ID=44796818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010056971A Abandoned JP2011191972A (en) 2010-03-15 2010-03-15 Device and method for measurement of motion vector

Country Status (1)

Country Link
JP (1) JP2011191972A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019028658A (en) * 2017-07-28 2019-02-21 セコム株式会社 Image analyzing apparatus
JP2019075029A (en) * 2017-10-19 2019-05-16 セコム株式会社 Object distribution estimation device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08265773A (en) * 1995-03-24 1996-10-11 Graphics Commun Lab:Kk Method for detecting hierarchical motion vector and device therefor
JP2004180044A (en) * 2002-11-28 2004-06-24 Shibasoku:Kk Motion vector processing method and motion vector processing circuit
JP2006067268A (en) * 2004-08-27 2006-03-09 Matsushita Electric Ind Co Ltd Device for detecting image motion vector, and method therefor
JP2008276308A (en) * 2007-04-25 2008-11-13 Sanyo Electric Co Ltd Video image processing apparatus, video image processing system, and navigation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08265773A (en) * 1995-03-24 1996-10-11 Graphics Commun Lab:Kk Method for detecting hierarchical motion vector and device therefor
JP2004180044A (en) * 2002-11-28 2004-06-24 Shibasoku:Kk Motion vector processing method and motion vector processing circuit
JP2006067268A (en) * 2004-08-27 2006-03-09 Matsushita Electric Ind Co Ltd Device for detecting image motion vector, and method therefor
JP2008276308A (en) * 2007-04-25 2008-11-13 Sanyo Electric Co Ltd Video image processing apparatus, video image processing system, and navigation device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019028658A (en) * 2017-07-28 2019-02-21 セコム株式会社 Image analyzing apparatus
JP2019075029A (en) * 2017-10-19 2019-05-16 セコム株式会社 Object distribution estimation device

Similar Documents

Publication Publication Date Title
JP6024658B2 (en) Object detection apparatus, object detection method, and program
EP3186780A1 (en) Systems and methods for image scanning
JP2016508652A (en) Determining object occlusion in image sequences
JP6194450B2 (en) State estimation device, program, and integrated circuit
US10410358B2 (en) Image processing with occlusion and error handling in motion fields
US10269099B2 (en) Method and apparatus for image processing
CN110060278A (en) The detection method and device of moving target based on background subtraction
KR101382367B1 (en) Method of motion estimation and image processing apparatus using the same
CN112393721B (en) Camera pose estimation method
JP2005252359A (en) Motion vector detecting apparatus, motion vector detection method and computer program
JP2011191972A (en) Device and method for measurement of motion vector
JP2020126383A (en) Moving object detection device, moving object detection method, and moving body detection program
JP2012181710A (en) Object tracking device, method and program
JP6079076B2 (en) Object tracking device and object tracking method
JP6057629B2 (en) Image processing apparatus, control method thereof, and control program
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
JP2015026117A (en) Image processing method, image processing apparatus, program, and recording medium
KR101480824B1 (en) Background motion compensation method using multi-homography scheme
JP2011191973A (en) Device and method for measurement of motion vector
JP2005252360A (en) Motion vector detecting apparatus, motion vector detection method and computer program
CN107341818A (en) Image analysis algorithm for the test of touch-screen response performance
JP2019176261A (en) Image processor
JP2009266170A (en) Information processor and method, and program
JP4840822B2 (en) Image processing method, apparatus and program
JPH08195956A (en) Moving amount detection method and moving amount detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20130531

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130725