JP2002315007A - Image processing equipment and method, recording medium, and program - Google Patents

Image processing equipment and method, recording medium, and program

Info

Publication number
JP2002315007A
JP2002315007A JP2001115926A JP2001115926A JP2002315007A JP 2002315007 A JP2002315007 A JP 2002315007A JP 2001115926 A JP2001115926 A JP 2001115926A JP 2001115926 A JP2001115926 A JP 2001115926A JP 2002315007 A JP2002315007 A JP 2002315007A
Authority
JP
Japan
Prior art keywords
reference image
value
calculating
image
motion vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2001115926A
Other languages
Japanese (ja)
Inventor
Mitsuharu Oki
光晴 大木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2001115926A priority Critical patent/JP2002315007A/en
Publication of JP2002315007A publication Critical patent/JP2002315007A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To calculate a moving vector between a standard image and a reference image, without producing a large number of interpolated image, i.e., without increasing the calculation cost. SOLUTION: A moving vector detecting part 15 obtains the standard image and the reference image from an image memory 14, calculates the moving vectors of the standard image and the reference image, and outputs the vectors to an image-correcting part 16 via a bus 18. The part 16 reads the reference image from the image memory 14, moves the read reference image in parallel by the amount corresponding to the moving vector, and convents the image into a corrected image, which is supplied to an output part 17 via the bus 18. The output part 17 carries out buffering of the corrected image supplied from the image correcting part 16 via the bus 18 and output the image to a display unit 3 of the last stage at a prescribed rate.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置およ
び方法、記録媒体、並びにプログラムに関し、例えば、
連続して撮影された複数の画像間における動きベクトル
を検出する場合に用いて好適な画像処理装置および方
法、記録媒体、並びにプログラムに関する。
The present invention relates to an image processing apparatus and method, a recording medium, and a program.
The present invention relates to an image processing apparatus and method, a recording medium, and a program suitable for use in detecting a motion vector between a plurality of continuously shot images.

【0002】[0002]

【従来の技術】従来、ビデオカメラを三脚などで固定す
ることなく、手に持って撮影をおこなった場合、手振れ
に起因して撮影した動画像が上下左右に振動し、再生し
たときに見難い画面となってしまう問題があった。その
ような問題を解決する方法として、画面が振動する動画
像を、画面が振動しない動画像に変換する処理、いわゆ
るスタビライザ処理が知られている。
2. Description of the Related Art Conventionally, when a video camera is photographed by holding it with a hand without being fixed by a tripod or the like, a moving image photographed due to camera shake vibrates up, down, left and right, and is difficult to see when reproduced. There was a problem that it became a screen. As a method for solving such a problem, a process of converting a moving image in which the screen vibrates to a moving image in which the screen does not vibrate, that is, a so-called stabilizer process is known.

【0003】また、動画像を圧縮符号化する技術におい
ては、動き補償による圧縮処理が知られている。
[0003] In a technique for compression-encoding a moving image, a compression process using motion compensation is known.

【0004】スタビライザ処理と動き補償による圧縮処
理とに共通する技術として、ブロックマッチング法と称
される技術がある。ブロックマッチング法とは、連続し
て撮影された2枚の画像(基準画像と参照画像)の間で
対応する画素を検出し、その動き量(画像間の動きベク
トル)を算出する技術である。
[0004] As a technique common to the stabilizer processing and the compression processing by motion compensation, there is a technique called a block matching method. The block matching method is a technique of detecting a corresponding pixel between two images (a reference image and a reference image) shot continuously, and calculating a motion amount (a motion vector between the images).

【0005】スタビライザ処理では、ブロックマッチン
グ法により、動画像を構成する複数の静止画像のうち、
例えば先頭の静止画像が基準画像とされ、以降に撮影さ
れた静止画像が参照画像とされて、基準画像と参照画像
の動きベクトルが算出され、参照画像の全体が動きベク
トルの分だけ平行移動される。それにより、画面が振動
していた動画像が、画面が振動しない動画像に補正され
る。
[0005] In the stabilizer processing, a plurality of still images constituting a moving image are obtained by a block matching method.
For example, the first still image is set as the reference image, the still images captured thereafter are set as the reference images, the motion vectors of the reference image and the reference image are calculated, and the entire reference image is translated by the motion vector. You. Thereby, the moving image whose screen vibrates is corrected to a moving image whose screen does not vibrate.

【0006】動き補償による圧縮処理では、ブロックマ
ッチング法により、基準画像と参照画像との間の動きベ
クトルが算出され、基準画像と動きベクトルとを用いて
参照画像を再現することによってデータ量を減少させて
いる。
In the compression processing based on motion compensation, a motion vector between a reference image and a reference image is calculated by a block matching method, and the data amount is reduced by reproducing the reference image using the reference image and the motion vector. Let me.

【0007】従来のブロックマッチング法について、基
準画像Aと参照画像Bを例にして説明する。以下、基準
画像Aの座標(i,j)に位置する画素を画素A(i,
j)と記述する。同様に、参照画像Bの座標(i,j)
に位置する画素を画素B(i,j)と記述する。座標
(i,j)は、それぞれ画像の水平方向、または垂直方
向の位置を示す整数である。
A conventional block matching method will be described with reference to a reference image A and a reference image B. Hereinafter, a pixel located at the coordinates (i, j) of the reference image A is referred to as a pixel A (i, j).
j). Similarly, the coordinates (i, j) of the reference image B
Is described as a pixel B (i, j). The coordinates (i, j) are integers indicating the horizontal position or the vertical position of the image, respectively.

【0008】始めに、基準画像Aと、参照画像Bをベク
トル(x,y)だけ平行移動させた画像との類似の程度
(以下、適切度と記述する)を評価する評価関数には、
例えば、次式(1)を用いて算出する。
First, an evaluation function for evaluating the degree of similarity (hereinafter referred to as appropriateness) between a reference image A and an image obtained by translating a reference image B by a vector (x, y) includes:
For example, it is calculated using the following equation (1).

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

【0009】なお、式(1)は、誤差関数であるので、
その値が小さいほど適切度が高いと評価する。
Since equation (1) is an error function,
The smaller the value, the higher the appropriateness.

【0010】ここで、ベクトル(x,y)には、基準画
像Aと参照画像Bとの間の動きベクトルと想定される全
ての値が代入される。それらのうち、適切度が最も高い
値となるベクトル(x,y)が最も適切なベクトル(x
fit,yfit)とされる。すなわち、基準画像Aを最も適
切なベクトル(xfit,yfit)だけ並行移動させた画像
が、参照画像Bとほぼ等しい画像となる。
Here, all values assumed to be motion vectors between the reference image A and the reference image B are substituted for the vector (x, y). Among them, the vector (x, y) having the highest appropriateness value is the most appropriate vector (x
fit , y fit ). That is, an image obtained by translating the reference image A by the most appropriate vector (x fit , y fit ) becomes an image substantially equal to the reference image B.

【0011】ところで、最も適切なベクトル(xfit
fit)が整数であるとは限らないので、ベクトル
(x,y)の値には小数を考慮しなければならない。し
かしながら、参照画像Bには整数で表現される画素B
(i,j)だけしか実在しないので、式(1)の演算に
整数ではないベクトル(x,y)を適用するためには、
実在する整数で表現される座標の画素からなる参照画像
Bを用いて、整数ではない座標の実在しない画素を補間
し、補間した画素からなる補間画像B’を生成する必要
がある。
By the way, the most appropriate vector (x fit ,
Since y fit ) is not always an integer, the value of the vector (x, y) must take decimals into account. However, the reference image B has a pixel B represented by an integer.
Since only (i, j) exists, in order to apply the non-integer vector (x, y) to the operation of equation (1),
It is necessary to interpolate non-existent pixels having non-integer coordinates using a reference image B including pixels of coordinates represented by real integers to generate an interpolated image B 'including interpolated pixels.

【0012】例えば、図1に示すように、参照画像Bの
中に実在しない画素P’は、その上下左右の座標に実在
する画素P1乃至P4を次式(以下、補間式と記述する)
に代入して補間する。 画素P’=B(x+i,y+j) =B(m+p+i,n+q+j) =(1−p)(1−q)B(m+i,n+j)+(1−p)qB(m+ i,n+1+j)+p(1−q)B(m+1+i,n+j)+pqB(m+1+ i,n+1+j)
[0012] For example, as shown in FIG. 1, pixel P nonexistent in the reference image B 'is the following equation pixels P 1 to P 4 actually exists on the vertical and horizontal coordinates (hereinafter, referred to as interpolation formula )
And interpolate. Pixel P '= B (x + i, y + j) = B (m + p + i, n + q + j) = (1-p) (1-q) B (m + i, n + j) + (1-p) qB (m + i, n + 1 + j) + p (1 −q) B (m + 1 + i, n + j) + pqB (m + 1 + i, n + 1 + j)

【0013】ここで、m,nは整数であり、p,qは0
以上1未満の小数である。以下、p,qを位相と記述す
る。
Here, m and n are integers, and p and q are 0
It is a decimal number less than 1 or more. Hereinafter, p and q are described as phases.

【0014】ブロックマッチング法によって算出する動
きベクトルの精度を、例えば、1/128とするために
は、ベクトル(x,y)のx,yの値を、それぞれ1/
128の単位毎に変化させて、式(1)に代入する必要
がある。そのためには、16384(=128×12
8)通りの位相に対する補間画像を生成する必要があ
る。
In order to set the accuracy of the motion vector calculated by the block matching method to, for example, 1/128, the values of x and y of the vector (x, y) are respectively reduced to 1/128.
It is necessary to change the value in units of 128 and substitute it into equation (1). For that purpose, 16384 (= 128 × 12
8) It is necessary to generate interpolated images for different phases.

【0015】図2は、上述した従来のブロックマッチン
グ法の処理手順を示すフローチャートである。すなわ
ち、ステップS1において、参照画像Bを用い、補間画
像B’ 1乃至B’k(いまの場合、k=16384)を生
成する。ステップS2において、基準画像Aと各補間画
像B’との適切度を、式(1)を用いて算出する。ステ
ップS3において、ステップS2で算出した基準画像A
と各補間画像B’との適切度のうちの最大値を検出し、
対応するベクトル(x,y)を、基準画像Aと参照画像
Bの動きベクトルとする。
FIG. 2 shows the conventional block matcher described above.
6 is a flowchart showing a processing procedure of a logging method. Sand
In step S1, the reference image B is used to generate an interpolation image.
Image B ' 1Or B 'k(In this case, k = 16384)
To achieve. In step S2, the reference image A and each interpolated image
The appropriateness with respect to the image B 'is calculated using Expression (1). Stay
In step S3, the reference image A calculated in step S2
And the maximum value of the appropriateness of each interpolated image B 'is detected,
The corresponding vector (x, y) is obtained by using the reference image A and the reference image
Let B be the motion vector.

【0016】[0016]

【発明が解決しようとする課題】以上説明したように、
従来のブロックマッチング法では、ステップS1におい
て数多くの補間画像B’1乃至B’kを生成する演算が必
要となるので、その演算コストが高くなり、一連の処理
を完了するまでの時間が長くなる課題があった。
As described above,
In the conventional block matching method, since an operation for generating a large number of interpolated images B ′ 1 to B ′ k is required in step S1, the operation cost increases, and the time required to complete a series of processes increases. There were challenges.

【0017】本発明はこのような状況に鑑みてなされた
ものであり、数多くの補間画像B’ 1乃至B’kを生成す
ることなく、すなわち、演算コストを上げることなく、
基準画像と参照画像との間の動きベクトルを算出できる
ようにすることを目的とする。
The present invention has been made in view of such a situation.
And many interpolated images B ' 1Or B 'kGenerate
Without, that is, without increasing the computational cost,
A motion vector between the reference image and the reference image can be calculated
The purpose is to be.

【0018】[0018]

【課題を解決するための手段】本発明の画像処理装置
は、動きベクトルの探索範囲を設定する設定手段と、探
索範囲を微少領域に区分する区分手段と、微少領域にお
ける評価値の極値を演算する第1の演算手段と、微少領
域の4端点にそれぞれ対応する評価値を演算する第2の
演算手段と、第1の演算手段によって演算された評価値
の極値と、第2の演算手段によって演算された4端点に
それぞれ対応する4つの評価値のうちの最適な評価値か
ら、微少領域に対応する最適評価値を決定する決定手段
と、異なる2つの微少領域にそれぞれ対応する2つの最
適評価値を比較して、より最適な一方の最適評価値を保
持する保持手段と、保持手段が最終的に保持した最適評
価値に対応する探索範囲内の位置に対応して、動きベク
トルを算出する算出手段とを含むことを特徴とする。
An image processing apparatus according to the present invention comprises a setting means for setting a search range of a motion vector, a dividing means for dividing a search range into a small area, and an extreme value of an evaluation value in a small area. First calculating means for calculating; second calculating means for calculating evaluation values respectively corresponding to the four end points of the minute area; extreme values of the evaluation values calculated by the first calculating means; Determining means for determining an optimum evaluation value corresponding to a micro area from the optimum evaluation value among the four evaluation values respectively corresponding to the four endpoints calculated by the means; and two determining means respectively corresponding to two different micro areas. By comparing the optimal evaluation values, a holding unit that holds one of the more optimal evaluation values, and a motion vector corresponding to a position in a search range corresponding to the optimal evaluation value finally held by the holding unit, Calculation to calculate Characterized in that it comprises a stage.

【0019】前記第1および第2の演算手段は、基準画
像の自己相関の値、参照画像の自己相関の値、および基
準画像と参照画像との相互相関の値を、それぞれ実在す
る画素を用いて演算し、それぞれの演算結果に小数から
なる係数を乗算し、それぞれの乗算結果を加算または減
算して評価値を演算するようにすることができる。
The first and second calculating means calculate the auto-correlation value of the reference image, the auto-correlation value of the reference image, and the cross-correlation value of the reference image and the reference image by using existing pixels. Then, each calculation result is multiplied by a coefficient consisting of a decimal number, and each multiplication result is added or subtracted to calculate an evaluation value.

【0020】本発明の画像処理方法は、動きベクトルの
探索範囲を設定する設定ステップと、探索範囲を微少領
域に区分する区分ステップと、微少領域における評価値
の極値を演算する第1の演算ステップと、微少領域の4
端点にそれぞれ対応する評価値を演算する第2の演算ス
テップと、第1の演算ステップの処理で演算された評価
値の極値と、第2の演算ステップの処理で演算された4
端点にそれぞれ対応する4つの評価値のうちの最適な評
価値から、微少領域に対応する最適評価値を決定する決
定ステップと、異なる2つの微少領域にそれぞれ対応す
る2つの最適評価値を比較して、より最適な一方の最適
評価値を保持する保持ステップと、保持ステップの処理
で最終的に保持された最適評価値に対応する探索範囲内
の位置に対応して、動きベクトルを算出する算出ステッ
プとを含むことを特徴とする。
According to the image processing method of the present invention, a setting step of setting a search range of a motion vector, a dividing step of dividing the search range into a small area, and a first calculation for calculating an extreme value of an evaluation value in the small area Steps and 4 of micro area
A second calculation step for calculating an evaluation value corresponding to each of the end points; an extreme value of the evaluation value calculated in the processing in the first calculation step;
A determination step of determining an optimum evaluation value corresponding to a minute area from an optimum evaluation value among four evaluation values respectively corresponding to end points, and comparing two optimum evaluation values respectively corresponding to two different minute areas. And a calculation step of calculating a motion vector corresponding to a position in a search range corresponding to the optimum evaluation value finally held in the processing of the holding step. And a step.

【0021】本発明の記録媒体のプログラムは、動きベ
クトルの探索範囲を設定する設定ステップと、探索範囲
を微少領域に区分する区分ステップと、微少領域におけ
る評価値の極値を演算する第1の演算ステップと、微少
領域の4端点にそれぞれ対応する評価値を演算する第2
の演算ステップと、第1の演算ステップの処理で演算さ
れた評価値の極値と、第2の演算ステップの処理で演算
された4端点にそれぞれ対応する4つの評価値のうちの
最適な評価値から、微少領域に対応する最適評価値を決
定する決定ステップと、異なる2つの微少領域にそれぞ
れ対応する2つの最適評価値を比較して、より最適な一
方の最適評価値を保持する保持ステップと、保持ステッ
プの処理で最終的に保持された最適評価値に対応する探
索範囲内の位置に対応して、動きベクトルを算出する算
出ステップとを含むことを特徴とする。
According to the recording medium program of the present invention, a setting step of setting a search range of a motion vector, a dividing step of dividing the search range into minute areas, and a first step of calculating an extreme value of an evaluation value in the minute areas. A calculation step, and a second step of calculating evaluation values respectively corresponding to the four end points of the minute area.
Calculation step, the extreme value of the evaluation value calculated in the processing of the first calculation step, and the optimum evaluation of the four evaluation values respectively corresponding to the four end points calculated in the processing of the second calculation step A determination step of determining an optimum evaluation value corresponding to a micro area from the values, and a holding step of comparing two optimum evaluation values respectively corresponding to two different micro areas to hold one of the more optimum evaluation values And a calculating step of calculating a motion vector corresponding to a position in the search range corresponding to the optimum evaluation value finally held in the processing of the holding step.

【0022】本発明のプログラムは、動きベクトルの探
索範囲を設定する設定ステップと、探索範囲を微少領域
に区分する区分ステップと、微少領域における評価値の
極値を演算する第1の演算ステップと、微少領域の4端
点にそれぞれ対応する評価値を演算する第2の演算ステ
ップと、第1の演算ステップの処理で演算された評価値
の極値と、第2の演算ステップの処理で演算された4端
点にそれぞれ対応する4つの評価値のうちの最適な評価
値から、微少領域に対応する最適評価値を決定する決定
ステップと、異なる2つの微少領域にそれぞれ対応する
2つの最適評価値を比較して、より最適な一方の最適評
価値を保持する保持ステップと、保持ステップの処理で
最終的に保持された最適評価値に対応する探索範囲内の
位置に対応して、動きベクトルを算出する算出ステップ
とをコンピュータに実行させることを特徴とする。
The program according to the present invention includes a setting step of setting a search range of a motion vector, a dividing step of dividing the search range into a small area, and a first calculation step of calculating an extreme value of an evaluation value in the small area. A second calculation step for calculating evaluation values respectively corresponding to the four end points of the micro area, an extreme value of the evaluation value calculated in the processing in the first calculation step, and a calculation in the processing in the second calculation step. A determination step of determining an optimum evaluation value corresponding to a micro area from the optimum evaluation values among the four evaluation values respectively corresponding to the four end points; and two optimum evaluation values respectively corresponding to two different micro areas. In comparison, a holding step of holding one of the more optimum evaluation values, and a position in the search range corresponding to the optimum evaluation value finally held in the processing of the holding step, Characterized in that to execute can a calculation step of calculating a vector computer.

【0023】本発明の画像処理装置および方法、並びに
プログラムにおいては、動きベクトルの探索範囲が設定
され、探索範囲が微少領域に区分される。微少領域にお
ける評価値の極値が演算され、微少領域の4端点にそれ
ぞれ対応する評価値が演算される。また、演算された評
価値の極値と、演算された4端点にそれぞれ対応する4
つの評価値のうちの最適な評価値から、微少領域に対応
する最適評価値が決定される。さらに、異なる2つの微
少領域にそれぞれ対応する2つの最適評価値が比較され
て、より最適な一方の最適評価値が保持されて、最終的
に保持された最適評価値に対応する探索範囲内の位置に
対応して、動きベクトルが算出される。
In the image processing apparatus, method, and program according to the present invention, a search range of a motion vector is set, and the search range is divided into minute areas. The extreme value of the evaluation value in the micro area is calculated, and the evaluation value corresponding to each of the four end points of the micro area is calculated. Also, the extreme values of the calculated evaluation values and the four end points corresponding to the four calculated end points, respectively.
The optimum evaluation value corresponding to the micro area is determined from the optimum evaluation value of the two evaluation values. Further, two optimal evaluation values respectively corresponding to two different micro areas are compared, one of the more optimal optimal evaluation values is held, and a search range corresponding to the finally retained optimal evaluation value is held. A motion vector is calculated according to the position.

【0024】[0024]

【発明の実施の形態】本発明の一実施の形態である画像
処理装置の構成例について、図3を参照して説明する。
この画像処理装置2は、撮影装置1から供給される動画
像(連続して撮影された静止画像)を、画面が振動しな
い動画像に変換して表示装置3に出力するものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A configuration example of an image processing apparatus according to an embodiment of the present invention will be described with reference to FIG.
The image processing device 2 converts a moving image (still images continuously shot) supplied from the photographing device 1 into a moving image whose screen does not vibrate, and outputs the moving image to the display device 3.

【0025】画像処理装置2において、制御部11は、
操作入力部12から入力されるユーザからの操作の情報
に対応し、バス18を介して画像処理装置2の各部を制
御する。操作入力部12は、ユーザの操作を受け付け
て、その操作の情報を、バス18を介して制御部11に
出力する。入力部13は、撮影装置1から入力される動
画像を、バス18を介して画像メモリ14に出力する。
画像メモリ14は、入力部13からバス18を介して供
給される動画像(連続して撮影された静止画像)を記憶
する。
In the image processing apparatus 2, the control unit 11
It controls each unit of the image processing apparatus 2 via the bus 18 in accordance with information of a user operation input from the operation input unit 12. The operation input unit 12 receives a user operation and outputs information on the operation to the control unit 11 via the bus 18. The input unit 13 outputs a moving image input from the imaging device 1 to the image memory 14 via the bus 18.
The image memory 14 stores a moving image (still images continuously shot) supplied from the input unit 13 via the bus 18.

【0026】動きベクトル検出部15は、画像メモリ1
4が記憶する動画像を構成する静止画像を順次読み出
し、例えば、先頭の画像を基準画像Aとし、以降に読み
出す画像を、順次、参照画像Bとして基準画像Aと参照
画像Bとの動きベクトルを算出し、算出した動きベクト
ルを、バス18を介して画像補正部16に出力する。
The motion vector detecting section 15 includes the image memory 1
4 sequentially reads out the still images constituting the moving image stored therein. For example, the first image is set as the reference image A, and the images to be read thereafter are sequentially set as the reference images B, and the motion vectors of the reference image A and the reference image B are sequentially set. The calculated motion vector is output to the image correction unit 16 via the bus 18.

【0027】画像補正部16は、画像メモリ14から基
準画像Aを読み出し、そのまま補正画像A’として、バ
ス18を介して出力部17に供給する。また、画像補正
部16は、画像メモリ14から参照画像Bを読み出し、
読み出した参照画像Bを対応する動きベクトルの分だけ
平行移動して補正画像B’n(n=1,2,・・・)に
変換し、バス18を介して出力部17に供給する。出力
部17は、画像補正部16からバス18を介して供給さ
れる補正画像A’,B’nをバッファリングし、所定の
レートで後段の表示装置3に出力する。
The image correction section 16 reads out the reference image A from the image memory 14 and supplies the reference image A as it is to the output section 17 via the bus 18 as a corrected image A '. Further, the image correction unit 16 reads the reference image B from the image memory 14 and
The read reference image B is translated in parallel by an amount corresponding to the corresponding motion vector, converted into a corrected image B′n (n = 1, 2,...), And supplied to the output unit 17 via the bus 18. The output unit 17 buffers the corrected images A ′ and B′n supplied from the image correction unit 16 via the bus 18 and outputs the buffered images to the subsequent display device 3 at a predetermined rate.

【0028】次に、動きベクトル検出部15による、水
平方向のmから(m+1)まで、垂直方向のnから(n
+1)までの範囲における最適な位相(p,q)を求め
る処理の概念について説明する。
Next, the motion vector detecting unit 15 changes from m in the horizontal direction to (m + 1) and from n in the vertical direction to (n
The concept of the process for finding the optimal phase (p, q) in the range up to +1) will be described.

【0029】基準画像Aと、参照画像Bをベクトル
(x,y)だけ平行移動させた画像との適切度を算出す
る式(1)のなかのB(x+i,y+j)に、上述した
補間式を代入すれば、式(1)は次式(2)に変形でき
る。
In the equation (1) for calculating the appropriateness between the reference image A and the image obtained by translating the reference image B by the vector (x, y), B (x + i, y + j) is used as the interpolation formula. Equation (1) can be transformed into the following equation (2).

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

【0030】式(2)の右辺は、位相(p,q)を変数
とする次式(3)に変形することができる。変数である
位相(p,q)は、それぞれ0以上1未満の小数であ
る。式(3)が示す値をαとする。
The right side of the equation (2) can be transformed into the following equation (3) using the phase (p, q) as a variable. The phase (p, q) which is a variable is a decimal number greater than or equal to 0 and less than 1. Let α be the value shown by equation (3).

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

【0031】いま、適切度が最も高い値となるベクトル
(x,y)、すなわち、式(1)によって算出される値
が最小となるベクトル(x,y)を検出することが目的
であるから、位相(p,q)が変数である式(3)の極
値を求めればよい。
Now, the object is to detect the vector (x, y) having the highest value of the appropriateness, that is, the vector (x, y) having the minimum value calculated by the equation (1). , The extreme value of the equation (3) in which the phase (p, q) is a variable may be obtained.

【0032】つまり、式(3)を変数である位相(p,
q)でそれぞれ偏微分し、次式(4),(5)に示すよ
うに、それら値が0となる位相(p,q)を求めればよ
い。以下、式(3)が極値となる位相(p,q)に対応
する適切度を適切度V5と記述する。
That is, the equation (3) is replaced by the phase (p,
q), and the phase (p, q) at which these values become 0 may be obtained as shown in the following equations (4) and (5). Hereinafter, the appropriateness corresponding to the phase (p, q) at which the expression (3) becomes an extreme value is described as appropriateness V5.

【0033】[0033]

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

【0034】[0034]

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

【0035】ただし、式(3)が、変数である位相
(p,q)について単調増加関数(または、単調減少関
数)である場合が考えられるので、式(3)に変数p=
0,q=0を代入した値を適切度V1とし、式(3)に
変数p=0,q=1を代入した値を適切度V2とし、式
(3)に変数p=1,q=0を代入した値を適切度V3
とし、式(4)に変数p=1,q=1を代入した値を適
切度V4として用意する。
However, since it is conceivable that the equation (3) is a monotonically increasing function (or a monotonically decreasing function) for the phase (p, q) as a variable, the variable p =
The value obtained by substituting 0 and q = 0 is referred to as appropriateness V1, the value obtained by substituting variables p = 0 and q = 1 in equation (3) is referred to as appropriateness V2, and the variables p = 1 and q = The value obtained by substituting 0 into the appropriateness degree V3
And a value obtained by substituting the variables p = 1 and q = 1 into the equation (4) is prepared as the appropriateness V4.

【0036】そして、適切度V1乃至V5のうち、最も
適切な値、すなわち最小の値を選択して、対応する変数
p,qを決定する。
Then, the most appropriate value, that is, the minimum value is selected from the appropriateness levels V1 to V5, and the corresponding variables p and q are determined.

【0037】このようにして、水平方向のmから(m+
1)まで、垂直方向のnから(n+1)までの範囲にお
ける最適な位相(p,q)を求めることができる。
Thus, from m in the horizontal direction to (m +
Up to 1), the optimal phase (p, q) in the range from n to (n + 1) in the vertical direction can be obtained.

【0038】なお、式(3)乃至式(5)を見れば明ら
かように、式(3)は、基準画像Aの自己相関の値と、
参照画像Bの自己相関の値に位相(p,q)からなる係
数が乗算された値と、基準画像Aと参照画像Bの相互相
関の値に位相(p,q)からなる係数が乗算された値と
から構成されていることがわかる。式(4),(5)
は、参照画像Bの自己相関の値に位相(p,q)からな
る係数が乗算された値と、基準画像Aと参照画像Bの相
互相関の値に位相(p,q)からなる係数が乗算された
値とから構成されていることがわかる。
As is clear from Equations (3) to (5), Equation (3) is obtained by calculating the value of the autocorrelation of the reference image A,
A value obtained by multiplying the value of the autocorrelation of the reference image B by a coefficient comprising the phase (p, q) is multiplied by a coefficient comprising the phase (p, q) by the value of the cross-correlation between the reference image A and the reference image B. It can be seen that the value is composed of Equations (4) and (5)
Is a value obtained by multiplying the value of the autocorrelation of the reference image B by a coefficient composed of the phase (p, q), and the value of the cross-correlation between the reference image A and the reference image B is represented by a coefficient composed of the phase (p, q). It can be seen that the value is composed of the multiplied value.

【0039】また、式(3)の演算の順序は、始めに、
基準画像Aの自己相関の値、参照画像Bの自己相関の
値、および基準画像Aと参照画像Bの相互相関の値が演
算された後、それらの位相(p,q)からなる係数が乗
算されて、それらの乗算値が加(減)算される。
The order of the operation of the equation (3) is as follows.
After the value of the autocorrelation of the reference image A, the value of the autocorrelation of the reference image B, and the value of the cross-correlation between the reference image A and the reference image B are calculated, the coefficients composed of their phases (p, q) are multiplied. Then, the multiplied values are added (subtracted).

【0040】上述した最適な位相(p,q)を決定する
処理を、探索範囲の中の(m,n)の全ての組合せに対
して実行することによって、基準画像Aと参照画像Bと
の間の動きベクトル(x、y)を求めることができる。
動きベクトル検出部15による動きベクトル検出処理に
ついて、図4のフローチャートを参照して説明する。
By performing the above-described process of determining the optimum phase (p, q) for all combinations of (m, n) in the search range, the reference image A and the reference image B The motion vector (x, y) between them can be obtained.
The motion vector detection processing by the motion vector detection unit 15 will be described with reference to the flowchart in FIG.

【0041】ステップS11において、制御部11は、
画像メモリ14が記憶する動画像を構成する静止画像を
動きベクトル検出部15に入力させる。動きベクトル検
出部15は、入力された先頭の画像を基準画像Aとし、
次の画像を参照画像Bとする。
In step S11, the control unit 11
The still image constituting the moving image stored in the image memory 14 is input to the motion vector detecting unit 15. The motion vector detection unit 15 sets the input first image as the reference image A,
The next image is referred to as a reference image B.

【0042】ステップS12において、制御部11は、
操作入力部12に対するユーザの操作に基づき、動きベ
クトル検出部15に対して動きベクトルの探索範囲を指
定する。すなわち、mの最小値mminおよび最大値
max、並びnの最小値nminおよび最大値nmaxが指定
される。このとき、ユーザは、基準画像Aと参照画像B
とのずれ量(動きベクトルの大きさ)はある程度予測が
つくので、その値を包むように探索範囲を指定する。な
お、探索範囲として、予め設定した初期値を用いるよう
にしてもよい。
In step S12, the control unit 11
Based on a user operation on the operation input unit 12, a search range of a motion vector is designated for the motion vector detection unit 15. That is, the minimum value m min and the maximum value m max of m, and the minimum value n min and the maximum value n max of the row n are specified. At this time, the user sets the reference image A and the reference image B
Since the deviation amount (the magnitude of the motion vector) from the above can be predicted to some extent, the search range is specified so as to encompass the value. Note that a preset initial value may be used as the search range.

【0043】ステップS13において、動きベクトル検
出部15は、変数m,nを、それぞれの最小値mmin
minに初期化する。また、動きベクトル検出部15
は、適切度Vfitに非常に大きな値を代入する。
In step S13, the motion vector detecting section 15 sets the variables m and n to their minimum values m min ,
Initialize to n min . Also, the motion vector detection unit 15
Substitutes a very large value for the appropriateness V fit .

【0044】ステップS14において、動きベクトル検
出部15は、(p=0,q=0),(p=0,q=
1),(p=1,q=0)、および(p=1,q=1)
を、それぞれ式(3)に代入して4種類のαを算出し、
それぞれを適切値V1乃至V4に代入する。
In step S14, the motion vector detecting section 15 sets (p = 0, q = 0), (p = 0, q =
1), (p = 1, q = 0), and (p = 1, q = 1)
Are respectively substituted into Expression (3) to calculate four types of α,
These are substituted for appropriate values V1 to V4.

【0045】ステップS15において、動きベクトル検
出部15は、式(4),(5)を満足する(p,q)が
存在するか否かを判定する。式(4),(5)を満足す
る(p,q)が存在すると判定された場合、処理はステ
ップS16に進む。ステップS16において、動きベク
トル検出部15は、式(4),(5)を満足する(p,
q)の値を式(3)に代入してαを算出し、αを適切値
V5に代入する。
In step S15, the motion vector detector 15 determines whether or not (p, q) that satisfies the equations (4) and (5) exists. If it is determined that (p, q) that satisfies the equations (4) and (5) exists, the process proceeds to step S16. In step S16, the motion vector detection unit 15 satisfies Expressions (4) and (5) (p,
The value of q) is substituted into equation (3) to calculate α, and α is substituted into an appropriate value V5.

【0046】なお、ステップS15において、式
(4),(5)を満足する(p,q)が存在しないと判
定された場合には、ステップS16の処理はスキップさ
れる。
If it is determined in step S15 that (p, q) that satisfies the equations (4) and (5) does not exist, the processing in step S16 is skipped.

【0047】ステップS17において、動きベクトル検
出部15は、適切値V1乃至V5のうちの最も適切な値
(いまの場合、最小となる値)を判定し、判定した適切
値を適切値Vに設定し、適切値Vに対応する(p,q)
の値を保持する。
In step S17, the motion vector detecting section 15 determines the most appropriate value (the minimum value in this case) among the appropriate values V1 to V5, and sets the determined appropriate value to the appropriate value V. And (p, q) corresponding to the appropriate value V
Holds the value of

【0048】例えば、適切値V1乃至V5のうち、適切
度V1が最小である場合、適切度V=適切度V1に設定
され、p=0,q=0が保持される。また、例えば、適
切値V1乃至V5のうち、適切度V2が最小である場
合、適切度V=適切度V2に設定され、p=0,q=1
が保持される。さらに、例えば、適切値V1乃至V5の
うち、適切度V5が最小である場合、適切度V=適切度
V5に設定され、式(4),(5)を満足する(p,
q)の値が保持される。
For example, when the appropriateness V1 among the appropriate values V1 to V5 is the minimum, the appropriateness V is set to the appropriateness V1, and p = 0 and q = 0 are held. Further, for example, when the appropriateness V2 among the appropriate values V1 to V5 is the minimum, the appropriateness V is set to the appropriateness V2, and p = 0 and q = 1.
Is held. Further, for example, when the appropriateness V5 among the appropriate values V1 to V5 is the minimum, the appropriateness V is set to the appropriateness V5, and the expressions (4) and (5) are satisfied (p, p).
The value of q) is retained.

【0049】ステップS18において、動きベクトル検
出部15は、ステップS17で設定した適切度Vが適切
度Vfitよりも適切であるか否か、すなわち、いまの場
合、適切度Vが適切度Vfitよりも小さいか否かを判定
する。適切度Vが適切度Vfitよりも適切であると判定
された場合、処理はステップS19に進む。
In step S18, the motion vector detection unit 15 determines whether or not the appropriateness V set in step S17 is more appropriate than the appropriateness Vfit , that is, in this case, the appropriateness V is equal to the appropriateness Vfit. It is determined whether it is smaller than. If it is determined that the appropriateness V is more appropriate than the appropriateness Vfit , the process proceeds to step S19.

【0050】ステップS19において、動きベクトル検
出部15は、変数mfitに変数mを代入し、変数nfit
変数nを代入し、変数pfitに変数pを代入し、適切度
fi tに適切度Vを代入する。
[0050] In step S19, the motion vector detecting section 15 substitutes a variable m to a variable m fit, by substituting the variable n to the variable n fit substitutes variable p to the variable p fit, the appropriateness V fi t The appropriateness V is substituted.

【0051】ただし、ステップS18において、適切度
Vが適切度Vfitよりも適切ではないと判定された場合
には、ステップS19の処理はスキップされる。
[0051] However, in step S18, if the appropriateness V is determined not to be appropriate than appropriateness V fit, the process of step S19 is skipped.

【0052】ステップS20において、動きベクトル検
出部15は、変数mを1だけインクリメントする。ステ
ップS21において、動きベクトル検出部15は、変数
mがその最大値mmax以下であるか否かを判定する。変
数mがその最大値mmax以下であると判定された場合、
処理はステップS14に戻り、以降の処理が繰り返され
る。その後、ステップS21において、変数mがその最
大値mmax以下ではないと判定された場合、処理はステ
ップS22に進む。
In step S20, the motion vector detecting section 15 increments the variable m by one. In step S21, the motion vector detector 15, the variable m is equal to or a maximum value m or max or less. If it is determined that the variable m is less than or equal to its maximum value mmax ,
The process returns to step S14, and the subsequent processes are repeated. Thereafter, when it is determined in step S21 that the variable m is not smaller than the maximum value mmax , the process proceeds to step S22.

【0053】ステップS22において、動きベクトル検
出部15は、変数mをその最小値m minに再び初期化す
る。また、動きベクトル検出部15は、変数nを1だけ
インクリメントする。ステップS23において、動きベ
クトル検出部15は、変数nがその最大値nmax以下で
あるか否かを判定する。変数nがその最大値nmax以下
であると判定された場合、処理はステップS14に戻
り、以降の処理が繰り返される。その後、ステップS2
3において、変数nがその最大値nmax以下ではないと
判定された場合、処理はステップS24に進む。
In step S22, the motion vector detection
The output unit 15 sets the variable m to its minimum value m minReinitialize to
You. Further, the motion vector detecting unit 15 sets the variable n to 1
Increment. In step S23, the motion
The vector detecting unit 15 determines that the variable n is the maximum value nmaxBelow
It is determined whether or not there is. Variable n is its maximum value nmaxLess than
If it is determined that the process is
Therefore, the subsequent processing is repeated. Then, step S2
3, the variable n has its maximum value nmaxNot less
If it is determined, the process proceeds to step S24.

【0054】ステップS24において、動きベクトル検
出部15は、基準画像Aと参照画像Bとの間の動きベク
トル(x、y)として、x=mfit+pfit,y=nfit
+qf itを算出する。算出された動きベクトル(x、
y)は画像補正部16に供給される。
In step S24, the motion vector detector 15 calculates x = m fit + p fit , y = n fit as the motion vector (x, y) between the reference image A and the reference image B.
+ To calculate the q f it. The calculated motion vector (x,
y) is supplied to the image correction unit 16.

【0055】以上説明したように、本発明の動きベクト
ル(x,y)を検出する処理においては、参照画像Bを
用いて補間画像B’を生成する処理が存在しないので、
動きベクトルを取得するまでの演算コストを削減するこ
とが可能となる。
As described above, in the processing for detecting the motion vector (x, y) of the present invention, there is no processing for generating the interpolated image B ′ using the reference image B.
It is possible to reduce the calculation cost until the motion vector is obtained.

【0056】なお、先に整数の精度で最適な動きベクト
ル(m,n)=(mtmp,ntmp)を求め、その後、探索
範囲を動きベクトル(mtmp,ntmp)の近傍(例えば、
±2の範囲)に限定することによって、より早く動くベ
クトルを検出することができる。いまの場合、ステップ
S12において、変数mの最小値mminをmtmp−2に、
変数mの最大値mmaxをmtmp+2に、変数nの最小値n
minをntmp−2に、変数nの最大値nmaxをntmp+2に
すればよい。
First, an optimal motion vector (m, n) = (m tmp , n tmp ) is obtained with integer precision, and then the search range is set to a value close to the motion vector (m tmp , n tmp ) (for example,
By limiting the range to (± 2 range), a vector that moves faster can be detected. In this case, in step S12, the minimum value m min of the variable m is set to m tmp -2,
The maximum value m max of the variable m is set to m tmp +2, and the minimum value n of the variable n
It is sufficient to set min to n tmp -2 and the maximum value n max of the variable n to n tmp +2.

【0057】ところで、上述した説明では、基準画像A
と、参照画像Bをベクトル(x,y)だけ平行移動させ
た画像との適切度を評価する評価関数には式(1)を用
いて算出するようにしたが、評価関数に次式(1’)を
用いて算出するようにしてもよい。
Incidentally, in the above description, the reference image A
And the image obtained by translating the reference image B by the vector (x, y) is used to calculate the evaluation function using Expression (1). ').

【数6】 ・・(1’)(Equation 6) ・ ・ (1 ')

【0058】なお、式(1’)は、正規化した相互相関
関数であるので、その値が大きいほど適切度が高いと評
価する。
Since the equation (1 ′) is a normalized cross-correlation function, it is evaluated that the larger the value is, the higher the appropriateness is.

【0059】評価関数に式(1’)を用いて場合、上述
した動きベクトル検出処理を、以下のように変更すれば
よい。
When equation (1 ′) is used as the evaluation function, the above-described motion vector detection processing may be changed as follows.

【0060】すなわち、ステップS11において、制御
部11は、画像メモリ14が記憶する動画像を構成する
静止画像を動きベクトル検出部15に入力させる。動き
ベクトル検出部15は、入力された先頭の画像を基準画
像Aとし、次の画像を参照画像Bとする。
That is, in step S 11, the control unit 11 causes the motion vector detection unit 15 to input a still image constituting a moving image stored in the image memory 14. The motion vector detecting unit 15 sets the input first image as the reference image A, and sets the next image as the reference image B.

【0061】ステップS12において、制御部11は、
操作入力部12に対するユーザの操作に基づき、動きベ
クトル検出部15に対して動きベクトルの探索範囲を指
定する。すなわち、mの最小値mminおよび最大値
max、並びnの最小値nminおよび最大値nmaxが指定
される。
In step S12, the control unit 11
Based on a user operation on the operation input unit 12, a search range of a motion vector is designated for the motion vector detection unit 15. That is, the minimum value m min and the maximum value m max of m, and the minimum value n min and the maximum value n max of the row n are specified.

【0062】ステップS13において、動きベクトル検
出部15は、変数m,nを、それぞれの最小値mmin
minに初期化する。また、動きベクトル検出部15
は、適切度Vfitに非常に小さな値を代入する。
In step S13, the motion vector detecting section 15 sets the variables m and n to their minimum values m min ,
Initialize to n min . Also, the motion vector detection unit 15
Substitutes a very small value for the appropriateness V fit .

【0063】ステップS14において、動きベクトル検
出部15は、(p=0,q=0),(p=0,q=
1),(p=1,q=0)、および(p=1,q=1)
を、それぞれ次式(3’)に代入して4種類のβを算出
し、それぞれを適切値V1乃至V4に代入する。ただ
し、式(3’)は、式(1’)に補間式を代入して変形
した次式(2’)をさらに変形したものである。
In step S14, the motion vector detecting section 15 sets (p = 0, q = 0), (p = 0, q =
1), (p = 1, q = 0), and (p = 1, q = 1)
Are respectively substituted into the following equation (3 ′) to calculate four types of β, and each is substituted into appropriate values V1 to V4. However, the equation (3 ′) is a further modified version of the following equation (2 ′) obtained by substituting the interpolation equation into the equation (1 ′).

【数7】 ・・・(2’)(Equation 7) ... (2 ')

【0064】[0064]

【数8】 ・・・(3’) ただし、(Equation 8) ... (3 ') However,

【数9】 (Equation 9)

【0065】ステップS15において、動きベクトル検
出部15は、式(3’)をpで偏微分した結果が0とな
る次式(4’)と、式(3’)をqで偏微分した結果が
0となる次式(5’)を満足する(p,q)が存在する
か否かを判定する。
In step S15, the motion vector detection unit 15 calculates the following equation (4 ') in which the result of partial differentiation of equation (3') with p is 0, and the result of partial differentiation of equation (3 ') with q. Is determined whether or not (p, q) that satisfies the following expression (5 ′) in which

【数10】 ・・・(4’)(Equation 10) ... (4 ')

【0066】[0066]

【数11】 ・・・(5’)[Equation 11] ... (5 ')

【0067】式(4’),(5’)を満足する(p,
q)が存在すると判定された場合、処理はステップS1
6に進む。ステップS16において、動きベクトル検出
部15は、式(4’),(5’)を満足する(p,q)
の値を式(3’)に代入してβを算出し、βを適切値V
5に代入する。
Equations (4 ') and (5') are satisfied (p,
If it is determined that q) exists, the process proceeds to step S1
Proceed to 6. In step S16, the motion vector detection unit 15 satisfies the equations (4 ′) and (5 ′) (p, q).
Is substituted into the equation (3 ′) to calculate β, and β is set to an appropriate value V
Substitute for 5.

【0068】なお、ステップS15において、式
(4’),(5’)を満足する(p,q)が存在しない
と判定された場合には、ステップS16の処理はスキッ
プされる。
If it is determined in step S15 that (p, q) that satisfies the equations (4 ') and (5') does not exist, the processing in step S16 is skipped.

【0069】ステップS17において、動きベクトル検
出部15は、適切値V1乃至V5のうちの最も適切な値
(いまの場合、最大となる値)を判定し、判定した適切
値を適切値Vに設定し、適切値Vに対応する(p,q)
の値を保持する。
In step S17, the motion vector detecting section 15 determines the most appropriate value (the largest value in this case) among the appropriate values V1 to V5, and sets the determined appropriate value to the appropriate value V. And (p, q) corresponding to the appropriate value V
Holds the value of

【0070】ステップS18において、動きベクトル検
出部15は、ステップS17で設定した適切度Vが適切
度Vfitよりも適切であるか否か、すなわち、いまの場
合、適切度Vが適切度Vfitよりも大きいか否かを判定
する。適切度Vが適切度Vfitよりも適切であると判定
された場合、処理はステップS19に進む。
In step S18, the motion vector detecting section 15 determines whether or not the appropriateness V set in step S17 is more appropriate than the appropriateness V fit , that is, in this case, the appropriateness V is equal to the appropriateness V fit It is determined whether it is greater than or equal to. If it is determined that the appropriateness V is more appropriate than the appropriateness Vfit , the process proceeds to step S19.

【0071】ステップS19において、動きベクトル検
出部15は、変数mfitに変数mを代入し、変数nfit
変数nを代入し、変数pfitに変数pを代入し、適切度
fi tに適切度Vを代入する。
[0071] In step S19, the motion vector detecting section 15 substitutes a variable m to a variable m fit, by substituting the variable n to the variable n fit substitutes variable p to the variable p fit, the appropriateness V fi t The appropriateness V is substituted.

【0072】ただし、ステップS18において、適切度
Vが適切度Vfitよりも適切ではないと判定された場合
には、ステップS19の処理はスキップされる。
[0072] However, in step S18, if the appropriateness V is determined not to be appropriate than appropriateness V fit, the process of step S19 is skipped.

【0073】ステップS20において、動きベクトル検
出部15は、変数mを1だけインクリメントする。ステ
ップS21において、動きベクトル検出部15は、変数
mがその最大値mmax以下であるか否かを判定する。変
数mがその最大値mmax以下であると判定された場合、
処理はステップS14に戻り、以降の処理が繰り返され
る。その後、ステップS21において、変数mがその最
大値mmax以下ではないと判定された場合、処理はステ
ップS22に進む。
In step S20, the motion vector detecting section 15 increments the variable m by one. In step S21, the motion vector detector 15, the variable m is equal to or a maximum value m or max or less. If it is determined that the variable m is less than or equal to its maximum value mmax ,
The process returns to step S14, and the subsequent processes are repeated. Thereafter, when it is determined in step S21 that the variable m is not smaller than the maximum value mmax , the process proceeds to step S22.

【0074】ステップS22において、動きベクトル検
出部15は、変数mをその最小値m minに再び初期化す
る。また、動きベクトル検出部15は、変数nを1だけ
インクリメントする。ステップS23において、動きベ
クトル検出部15は、変数nがその最大値nmax以下で
あるか否かを判定する。変数nがその最大値nmax以下
であると判定された場合、処理はステップS14に戻
り、以降の処理が繰り返される。その後、ステップS2
3において、変数nがその最大値nmax以下ではないと
判定された場合、処理はステップS24に進む。
In step S22, the motion vector detection
The output unit 15 sets the variable m to its minimum value m minReinitialize to
You. Further, the motion vector detecting unit 15 sets the variable n to 1
Increment. In step S23, the motion
The vector detecting unit 15 determines that the variable n is the maximum value nmaxBelow
It is determined whether or not there is. Variable n is its maximum value nmaxLess than
If it is determined that the process is
Therefore, the subsequent processing is repeated. Then, step S2
3, the variable n has its maximum value nmaxNot less
If it is determined, the process proceeds to step S24.

【0075】ステップS24において、動きベクトル検
出部15は、基準画像Aと参照画像Bとの間の動きベク
トル(x、y)として、x=mfit+pfit,y=nfit
+qf itを算出する。
In step S24, the motion vector detector 15 calculates x = m fit + p fit , y = n fit as the motion vector (x, y) between the reference image A and the reference image B.
+ To calculate the q f it.

【0076】以上説明したように、評価関数に正規化し
た相互相関関数を用いても、動きベクトル(x、y)を
算出することができる。
As described above, the motion vector (x, y) can be calculated by using the normalized cross-correlation function as the evaluation function.

【0077】なお、上述した説明は、参照画像の補間に
補間点の上下左右に実在する4画素を用いる場合に対応
するが、本発明は、他の補間方法(例えば、補間点の近
傍に実在する9画素を用いる場合)に適用することも可
能である。
Note that the above description corresponds to the case where four pixels existing at the top, bottom, left and right of the interpolation point are used for interpolation of the reference image. However, the present invention uses another interpolation method (for example, a method in which a real pixel exists near the interpolation point). (When nine pixels are used).

【0078】ところで、上述した一連の処理は、画像処
理装置2のようなハードウェアにより実行させることも
できるが、ソフトウェアにより実行させることもでき
る。一連の処理をソフトウェアにより実行させる場合に
は、そのソフトウェアを構成するプログラムが、専用の
ハードウェアに組み込まれているコンピュータ、また
は、各種のプログラムをインストールすることで、各種
の機能を実行することが可能な、例えば汎用のパーソナ
ルコンピュータなどに、記録媒体からインストールされ
る。
Incidentally, the above-described series of processing can be executed by hardware such as the image processing apparatus 2, but can also be executed by software. When a series of processing is executed by software, a program constituting the software can execute various functions by installing a computer built into dedicated hardware or installing various programs. It is installed from a recording medium into a possible general-purpose personal computer or the like.

【0079】この記録媒体は、図15に示すように、コ
ンピュータとは別に、ユーザにプログラムを提供するた
めに配布される、プログラムが記録されている磁気ディ
スク41(フロッピディスクを含む)、光ディスク42
(CD-ROM(Compact Disc-ReadOnly Memory)、DVD(Digita
l Versatile Disc)を含む)、光磁気ディスク43(M
D(Mini Disc)を含む)、もしくは半導体メモリ44な
どよりなるパッケージメディアにより構成されるだけで
なく、コンピュータに予め組み込まれた状態でユーザに
提供される、プログラムが記録されているROM32や記
憶部38に含まれるハードディスクなどで構成される。
As shown in FIG. 15, the recording medium is a magnetic disk 41 (including a floppy disk) on which the program is recorded and an optical disk 42, which are distributed separately from the computer to provide the program to the user.
(CD-ROM (Compact Disc-Read Only Memory), DVD (Digita
l Versatile Disc), magneto-optical disc 43 (M
D (including Mini Disc), or a package medium including a semiconductor memory 44, etc., and also provided to a user in a state where the program is incorporated in a computer in advance. And a hard disk included in the hard disk drive 38.

【0080】なお、本明細書において、記録媒体に記録
されるプログラムを記述するステップは、記載された順
序に従って時系列的に行われる処理はもちろん、必ずし
も時系列的に処理されなくとも、並列的あるいは個別に
実行される処理をも含むものである。
In this specification, the steps for describing the program recorded on the recording medium are not limited to the processing performed in chronological order according to the described order, but are not necessarily performed in chronological order. Alternatively, it also includes individually executed processing.

【0081】また、本明細書において、システムとは、
複数の装置により構成される装置全体を表すものであ
る。
In this specification, the system is
It represents the entire device composed of a plurality of devices.

【0082】[0082]

【発明の効果】以上のように、本発明の画像処理装置お
よび方法、並びにプログラムによれば、微少領域におけ
る評価値の極値と、4端点にそれぞれ対応する4つの評
価値のうちの最適な評価値から、微少領域に対応する最
適評価値を決定し、異なる2つの微少領域にそれぞれ対
応する2つの最適評価値を比較して、より最適な一方の
最適評価値を保持し、最終的に保持した最適評価値に対
応する探索範囲内の位置に対応して動きベクトルを算出
するようにしたので、数多くの補間画像を生成すること
なく、すなわち、演算コストを上げることなく、基準画
像と参照画像との間の動きベクトルを算出することが可
能となる。
As described above, according to the image processing apparatus, method, and program of the present invention, the optimum value of the extreme value of the evaluation value in the minute area and the optimum value of the four evaluation values respectively corresponding to the four end points are obtained. From the evaluation values, the optimum evaluation value corresponding to the micro area is determined, the two optimum evaluation values corresponding to the two different micro areas are compared, one of the more optimum evaluation values is held, and finally, Since the motion vector is calculated corresponding to the position in the search range corresponding to the held optimal evaluation value, the reference image and the reference image are generated without generating many interpolation images, that is, without increasing the calculation cost. It is possible to calculate a motion vector between the image and the image.

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

【図1】参照画像Bを補間して補間画像B’を生成する
処理を説明するための図である。
FIG. 1 is a diagram for explaining a process of generating an interpolated image B ′ by interpolating a reference image B;

【図2】従来の動きベクトル検出処理の一例を説明する
フローチャートである。
FIG. 2 is a flowchart illustrating an example of a conventional motion vector detection process.

【図3】画像処理装置2の構成例を示すブロック図であ
る。
FIG. 3 is a block diagram illustrating a configuration example of an image processing apparatus 2.

【図4】動きベクトル検出部15による動きベクトル検
出処理を説明するフローチャートである。
FIG. 4 is a flowchart illustrating a motion vector detection process by a motion vector detection unit 15;

【図5】汎用のパーソナルコンピュータの構成例を示す
ブロック図である。
FIG. 5 is a block diagram illustrating a configuration example of a general-purpose personal computer.

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

2 画像処理装置, 11 制御部, 12操作入力
部, 13 入力部,14 画像メモリ, 15 動き
ベクトル検出部, 16 画像補正部, 17出力部,
31 CPU, 41 磁気ディスク, 42 光ディ
スク, 43光磁気ディスク, 44 半導体メモリ
2 image processing device, 11 control unit, 12 operation input unit, 13 input unit, 14 image memory, 15 motion vector detection unit, 16 image correction unit, 17 output unit,
31 CPU, 41 magnetic disk, 42 optical disk, 43 magneto-optical disk, 44 semiconductor memory

フロントページの続き Fターム(参考) 5C059 KK19 LB18 NN03 NN08 NN32 PP04 SS14 SS20 UA34 UA39 5J064 AA02 BB01 BB03 BB04 BC01 BD03 5L096 FA45 HA04 Continued on the front page F term (reference) 5C059 KK19 LB18 NN03 NN08 NN32 PP04 SS14 SS20 UA34 UA39 5J064 AA02 BB01 BB03 BB04 BC01 BD03 5L096 FA45 HA04

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 基準画像と参照画像との類似の程度を評
価する評価値に基づいて、前記基準画像と前記参照画像
との間の動きベクトルを検出する画像処理装置におい
て、 前記動きベクトルの探索範囲を設定する設定手段と、 前記探索範囲を微少領域に区分する区分手段と、 前記微少領域における前記評価値の極値を演算する第1
の演算手段と、 前記微少領域の4端点にそれぞれ対応する前記評価値を
演算する第2の演算手段と、 前記第1の演算手段によって演算された前記評価値の前
記極値と、前記第2の演算手段によって演算された前記
4端点にそれぞれ対応する4つの前記評価値のうちの最
適な評価値から、前記微少領域に対応する最適評価値を
決定する決定手段と、 異なる2つの前記微少領域にそれぞれ対応する2つの前
記最適評価値を比較して、より最適な一方の前記最適評
価値を保持する保持手段と、 前記保持手段が最終的に保持した前記最適評価値に対応
する前記探索範囲内の位置に対応して、前記動きベクト
ルを算出する算出手段とを含むことを特徴とする画像処
理装置。
An image processing apparatus for detecting a motion vector between the reference image and the reference image based on an evaluation value for evaluating a degree of similarity between the reference image and the reference image; Setting means for setting a range; dividing means for dividing the search range into minute regions; first calculating an extreme value of the evaluation value in the minute regions
Calculating means for calculating the evaluation values respectively corresponding to the four end points of the minute area; the extreme value of the evaluation value calculated by the first calculating means; Determining means for determining an optimum evaluation value corresponding to the small area from an optimum evaluation value among the four evaluation values respectively corresponding to the four end points calculated by the calculating means; and two different small areas. Holding means for comparing the two optimum evaluation values respectively corresponding to the above, and holding one of the more optimum evaluation values; and the search range corresponding to the optimum evaluation value finally held by the holding means. Calculating means for calculating the motion vector corresponding to a position in the image processing apparatus.
【請求項2】 前記第1および第2の演算手段は、前記
基準画像の自己相関の値、前記参照画像の自己相関の
値、および前記基準画像と前記参照画像との相互相関の
値を、それぞれ実在する画素を用いて演算し、それぞれ
の演算結果に小数からなる係数を乗算し、それぞれの乗
算結果を加算または減算して前記評価値を演算すること
を特徴とする請求項1に記載の画像処理装置。
2. The method according to claim 1, wherein the first and second calculating means calculate an auto-correlation value of the reference image, an auto-correlation value of the reference image, and a cross-correlation value of the reference image and the reference image. The method according to claim 1, wherein the evaluation value is calculated by using each existing pixel, multiplying each calculation result by a coefficient having a decimal number, and adding or subtracting each multiplication result. Image processing device.
【請求項3】 基準画像と参照画像との類似の程度を評
価する評価値に基づいて、前記基準画像と前記参照画像
との間の動きベクトルを検出する画像処理装置の画像処
理方法において、 前記動きベクトルの探索範囲を設定する設定ステップ
と、 前記探索範囲を微少領域に区分する区分ステップと、 前記微少領域における前記評価値の極値を演算する第1
の演算ステップと、 前記微少領域の4端点にそれぞれ対応する前記評価値を
演算する第2の演算ステップと、 前記第1の演算ステップの処理で演算された前記評価値
の前記極値と、前記第2の演算ステップの処理で演算さ
れた前記4端点にそれぞれ対応する4つの前記評価値の
うちの最適な評価値から、前記微少領域に対応する最適
評価値を決定する決定ステップと、 異なる2つの前記微少領域にそれぞれ対応する2つの前
記最適評価値を比較して、より最適な一方の前記最適評
価値を保持する保持ステップと、 前記保持ステップの処理で最終的に保持された前記最適
評価値に対応する前記探索範囲内の位置に対応して、前
記動きベクトルを算出する算出ステップとを含むことを
特徴とする画像処理方法。
3. An image processing method of an image processing device for detecting a motion vector between the reference image and the reference image based on an evaluation value for evaluating a degree of similarity between the reference image and the reference image, A setting step of setting a search range of a motion vector; a dividing step of dividing the search range into minute regions; a first step of calculating an extreme value of the evaluation value in the minute regions
A second calculating step of calculating the evaluation values respectively corresponding to the four end points of the micro area; an extreme value of the evaluation value calculated in the processing of the first calculating step; A determining step of determining an optimum evaluation value corresponding to the micro area from an optimum evaluation value among the four evaluation values respectively corresponding to the four endpoints calculated in the processing of the second calculation step; A holding step of comparing the two optimal evaluation values respectively corresponding to the two small areas, and holding one of the more optimal evaluation values; and the optimal evaluation finally held in the processing of the holding step Calculating a motion vector corresponding to a position in the search range corresponding to a value.
【請求項4】 基準画像と参照画像との類似の程度を評
価する評価値に基づいて、前記基準画像と前記参照画像
との間の動きベクトルを検出する画像処理用のプログラ
ムであって、 前記動きベクトルの探索範囲を設定する設定ステップ
と、 前記探索範囲を微少領域に区分する区分ステップと、 前記微少領域における前記評価値の極値を演算する第1
の演算ステップと、 前記微少領域の4端点にそれぞれ対応する前記評価値を
演算する第2の演算ステップと、 前記第1の演算ステップの処理で演算された前記評価値
の前記極値と、前記第2の演算ステップの処理で演算さ
れた前記4端点にそれぞれ対応する4つの前記評価値の
うちの最適な評価値から、前記微少領域に対応する最適
評価値を決定する決定ステップと、 異なる2つの前記微少領域にそれぞれ対応する2つの前
記最適評価値を比較して、より最適な一方の前記最適評
価値を保持する保持ステップと、 前記保持ステップの処理で最終的に保持された前記最適
評価値に対応する前記探索範囲内の位置に対応して、前
記動きベクトルを算出する算出ステップとを含むことを
特徴とするコンピュータが読み取り可能なプログラムが
記録されている記録媒体。
4. A program for image processing for detecting a motion vector between the reference image and the reference image based on an evaluation value for evaluating a degree of similarity between the reference image and the reference image, A setting step of setting a search range of a motion vector; a dividing step of dividing the search range into minute regions; and a first calculating an extreme value of the evaluation value in the minute regions.
A second calculating step of calculating the evaluation values respectively corresponding to the four end points of the micro area; an extreme value of the evaluation value calculated in the processing of the first calculating step; A determining step of determining an optimum evaluation value corresponding to the micro area from an optimum evaluation value among the four evaluation values respectively corresponding to the four end points calculated in the processing of the second calculation step; A holding step of comparing the two optimal evaluation values respectively corresponding to the two small areas, and holding one of the more optimal evaluation values; and the optimal evaluation finally held in the processing of the holding step Calculating a motion vector corresponding to a position in the search range corresponding to a value. Recording media.
【請求項5】 基準画像と参照画像との類似の程度を評
価する評価値に基づいて、前記基準画像と前記参照画像
との間の動きベクトルを検出するコンピュータに、 前記動きベクトルの探索範囲を設定する設定ステップ
と、 前記探索範囲を微少領域に区分する区分ステップと、 前記微少領域における前記評価値の極値を演算する第1
の演算ステップと、 前記微少領域の4端点にそれぞれ対応する前記評価値を
演算する第2の演算ステップと、 前記第1の演算ステップの処理で演算された前記評価値
の前記極値と、前記第2の演算ステップの処理で演算さ
れた前記4端点にそれぞれ対応する4つの前記評価値の
うちの最適な評価値から、前記微少領域に対応する最適
評価値を決定する決定ステップと、 異なる2つの前記微少領域にそれぞれ対応する2つの前
記最適評価値を比較して、より最適な一方の前記最適評
価値を保持する保持ステップと、 前記保持ステップの処理で最終的に保持された前記最適
評価値に対応する前記探索範囲内の位置に対応して、前
記動きベクトルを算出する算出ステップとを実行させる
プログラム。
5. A computer for detecting a motion vector between the reference image and the reference image based on an evaluation value for evaluating a degree of similarity between the reference image and the reference image, A setting step of setting; a dividing step of dividing the search range into minute regions; and a first calculating an extreme value of the evaluation value in the minute regions.
A second calculating step of calculating the evaluation values respectively corresponding to the four end points of the micro area; an extreme value of the evaluation value calculated in the processing of the first calculating step; A determining step of determining an optimum evaluation value corresponding to the micro area from an optimum evaluation value among the four evaluation values respectively corresponding to the four end points calculated in the processing of the second calculation step; A holding step of comparing the two optimal evaluation values respectively corresponding to the two small areas, and holding one of the more optimal evaluation values; and the optimal evaluation finally held in the processing of the holding step A calculating step of calculating the motion vector corresponding to a position in the search range corresponding to a value.
JP2001115926A 2001-04-13 2001-04-13 Image processing equipment and method, recording medium, and program Withdrawn JP2002315007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001115926A JP2002315007A (en) 2001-04-13 2001-04-13 Image processing equipment and method, recording medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001115926A JP2002315007A (en) 2001-04-13 2001-04-13 Image processing equipment and method, recording medium, and program

Publications (1)

Publication Number Publication Date
JP2002315007A true JP2002315007A (en) 2002-10-25

Family

ID=18966745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001115926A Withdrawn JP2002315007A (en) 2001-04-13 2001-04-13 Image processing equipment and method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP2002315007A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260481A (en) * 2004-03-10 2005-09-22 Olympus Corp Device and method for detecting motion vector and camera
WO2006038334A1 (en) * 2004-09-30 2006-04-13 Mitsubishi Denki Kabushiki Kaisha Image taking device and image restoring method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260481A (en) * 2004-03-10 2005-09-22 Olympus Corp Device and method for detecting motion vector and camera
WO2006038334A1 (en) * 2004-09-30 2006-04-13 Mitsubishi Denki Kabushiki Kaisha Image taking device and image restoring method
US7652689B2 (en) 2004-09-30 2010-01-26 Mitsubishi Electric Corporation Picture taking device and picture restoration method

Similar Documents

Publication Publication Date Title
US7750942B2 (en) Image processing apparatus and method, recording medium, and program for correcting camera shake
US7418155B2 (en) Image processing method, image processing apparatus and image pickup apparatus and display apparatus suitable for the application of image processing method
US8818046B2 (en) Image processing device, image processing method, and program
JP4719553B2 (en) Imaging apparatus, imaging method, computer program, and computer-readable storage medium
US7855731B2 (en) Image vibration-compensating apparatus and method thereof
US6980237B2 (en) Image processing method
JP5531194B2 (en) Image processing apparatus, image processing method, and image processing program
KR20050065298A (en) Motion compensated frame rate conversion
US20090079836A1 (en) Image processing apparatus, method, and computer program product
JPS63166370A (en) Picture movement correcting device
JP7027776B2 (en) Movement vector calculation method, device, program, and movement vector calculation method including noise reduction processing.
US20150310626A1 (en) Motion vector detector, distance detector, motion vector detection method and computer program product
KR101945233B1 (en) Method and Apparatus for Stabilizing Video
JP2002315007A (en) Image processing equipment and method, recording medium, and program
JP4499686B2 (en) Image processing apparatus and method, recording medium, and program
JP2007028251A (en) Image processing apparatus, image processing method, program, and recording medium
JP2009065619A (en) Camera-shake correcting device and imaging apparatus
KR101945243B1 (en) Method and Apparatus For Providing Multiple-Speed Reproduction of Video
JP4881812B2 (en) Flicker correction apparatus and flicker correction method
JP4763419B2 (en) Image processing device
JP4250807B2 (en) Field frequency conversion device and conversion method
JP2975146B2 (en) Motion vector detection device
JP5057665B2 (en) Image processing device
JP4894937B2 (en) Image processing apparatus and method
JP2005347973A (en) Image pickup device

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080701