JP4655215B2 - Image processing apparatus and method, and program - Google Patents

Image processing apparatus and method, and program Download PDF

Info

Publication number
JP4655215B2
JP4655215B2 JP2005261437A JP2005261437A JP4655215B2 JP 4655215 B2 JP4655215 B2 JP 4655215B2 JP 2005261437 A JP2005261437 A JP 2005261437A JP 2005261437 A JP2005261437 A JP 2005261437A JP 4655215 B2 JP4655215 B2 JP 4655215B2
Authority
JP
Japan
Prior art keywords
vector
pixel
motion vector
frame
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005261437A
Other languages
Japanese (ja)
Other versions
JP2007074594A (en
Inventor
悠太 長木
邦雄 川口
彰彦 貝野
賢 堀士
康昭 高橋
幸弘 中村
典文 吉原
孝文 森藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2005261437A priority Critical patent/JP4655215B2/en
Publication of JP2007074594A publication Critical patent/JP2007074594A/en
Application granted granted Critical
Publication of JP4655215B2 publication Critical patent/JP4655215B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置および方法、並びにプログラムに関し、特に、より精度の高い動きベクトルを選択することができるようにした画像処理装置および方法、並びにプログラムに関する。   The present invention relates to an image processing apparatus and method, and a program, and more particularly, to an image processing apparatus and method, and a program capable of selecting a motion vector with higher accuracy.

入力された画像(フレーム)のフレーム周波数をアップコンバートして出力する装置においては、入力されたフレームから、それらのフレームの間に挿入する内挿フレームを生成することが行われる。入力されたフレームが出力されるとともに、生成された内挿フレームが、入力されたフレームの間の所定のタイミングで出力されることにより、フレーム周波数のアップコンバートが実現される。   In an apparatus for up-converting and outputting the frame frequency of an input image (frame), an interpolated frame to be inserted between those frames is generated from the input frame. The input frame is output, and the generated interpolation frame is output at a predetermined timing between the input frames, thereby realizing frame frequency up-conversion.

この内挿フレームは、例えば、内挿フレームを構成するそれぞれの画素に動きベクトルを割り付け、割り付けた動きベクトルによって対応付けられる入力された2つのフレーム上の画素から、内挿フレームを構成するそれぞれの画素を補間して生成される。   In this interpolation frame, for example, a motion vector is allocated to each pixel constituting the interpolation frame, and each pixel constituting the interpolation frame is composed of pixels on two input frames associated with the allocated motion vector. Generated by interpolating pixels.

したがって、内挿フレームを構成するそれぞれの画素に割り付けられる動きベクトルの精度が、出力される画像の質に大きな影響を与えることになる。例えば、画枠の一方から他方に向かって、一定の形状のオブジェクトが等速で移動する内容の動画像が入力され、そのフレーム周波数をアップコンバートして出力する場合、精度の低い動きベクトルに基づいて生成された内挿フレームが出力されることにより、オブジェクトの移動が等速に見えなかったり、オブジェクトが変形しながら移動しているように見えたりすることになる。   Therefore, the accuracy of the motion vector assigned to each pixel constituting the interpolated frame greatly affects the quality of the output image. For example, when a moving image whose content is such that an object of a certain shape moves at a constant speed from one side of the image frame to the other is input and the frame frequency is up-converted and output, it is based on a motion vector with low accuracy. When the interpolation frame generated in this way is output, the movement of the object does not appear to be uniform, or the object appears to move while deforming.

内挿フレームを構成するそれぞれの画素に割り付ける動きベクトルを検出する方法としては、例えば、特許文献1に記載されているような勾配法やブロックマッチング法などがある。
特開昭60−158786公報
As a method for detecting a motion vector assigned to each pixel constituting the interpolation frame, for example, there are a gradient method and a block matching method as described in Patent Document 1.
JP 60-158786 A

上述したように、出力される画像の質に影響を与えることから、内挿フレームを構成するそれぞれの画素に割り付けられる動きベクトルは、より精度が高い方が好ましい。   As described above, since the quality of the output image is affected, it is preferable that the motion vector assigned to each pixel constituting the interpolation frame has higher accuracy.

例えば、繰り返し行われる勾配法演算により検出された動きベクトルを、内挿フレームを構成するそれぞれの画素に割り付ける場合、繰り返し行われる勾配法演算によって検出結果として求められる動きベクトルは、勾配法の性質上、処理が進むほど精度の高いものとなることから、そのように処理が進んでから得られた動きベクトルが内挿フレームを構成するそれぞれの画素に割り付けられることが好ましい。   For example, when a motion vector detected by repeated gradient method calculation is assigned to each pixel constituting the interpolation frame, the motion vector obtained as a detection result by repeated gradient method calculation is As the processing proceeds, the accuracy becomes higher. Therefore, it is preferable that the motion vector obtained after the processing proceeds is assigned to each pixel constituting the interpolation frame.

本発明はこのような状況に鑑みてなされたものであり、より精度の高い動きベクトルを選択することができるようにするものである。   The present invention has been made in view of such a situation, and makes it possible to select a motion vector with higher accuracy.

本発明の一側面の画像処理装置は、ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域に着目し、勾配法により動きベクトルを検出する検出手段と、生成対象となる第2のフレームに含まれるそれぞれの領域に、前記検出手段が領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付ける割付手段とを備える。   An image processing apparatus according to one aspect of the present invention focuses on each region included in a first frame in raster order or reverse raster order, detects a motion vector by a gradient method, and generates a second target to be generated. The detection means pays attention to each area included in the frame in the order opposite to the order in which the detection means pays attention to the area, and one motion vector among the motion vectors assigned to the surrounding areas is assigned to the attention area. Allocating means for allocating.

前記第1のフレームの第1の演算対象範囲と、前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルによって前記第1の演算対象範囲と対応付けられる前記第1のフレームから時間的に後の第3のフレームの第2の演算対象範囲との相関を求める演算手段をさらに設けることができる。この場合、前記割付手段には、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択させることができる。   The first calculation target range of the first frame and the first calculation unit associated with the first calculation target range by a motion vector assigned to a region around the region of interest in the second frame. There can be further provided a calculation means for obtaining a correlation with the second calculation target range of the third frame temporally after this frame. In this case, the allocating unit can select one motion vector from among the motion vectors allocated to the peripheral region based on the correlation obtained by the calculating unit.

前記第1のフレームの第1の演算対象範囲内の各画素の画素値から前記第1の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第1の演算対象範囲内の各画素の画素値と、前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルによって前記第1の演算対象範囲と対応付けられる前記第1のフレームから時間的に後の第3のフレームの第2の演算対象範囲内の各画素の画素値から前記第2の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第2の演算対象範囲内の各画素の画素値とから、前記第1と第2の演算対象範囲の相関を求める演算手段をさらに設けることができる。この場合、前記割付手段には、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択させることができる。   Within the first calculation target range obtained by subtracting the average value of the pixel values of the pixels within the first calculation target range from the pixel value of each pixel within the first calculation target range of the first frame. After the first frame associated with the first calculation target range by the pixel value of each pixel and the motion vector assigned to the area around the area of interest in the second frame In the second calculation target range obtained by subtracting the average value of the pixel values of the pixels in the second calculation target range from the pixel values of the pixels in the second calculation target range of the third frame A calculation means for obtaining a correlation between the first and second calculation target ranges from the pixel value of each pixel can be further provided. In this case, the allocating unit can select one motion vector from among the motion vectors allocated to the peripheral region based on the correlation obtained by the calculating unit.

本発明の一側面の情報処理方法またはプログラムは、ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域に着目し、勾配法により動きベクトルを検出し、生成対象となる第2のフレームに含まれるそれぞれの領域に、動きベクトルの検出のときに領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付けるステップを含む。   An information processing method or program according to one aspect of the present invention focuses on each region included in a first frame in raster order or reverse raster order, detects a motion vector by a gradient method, and generates a second target to be generated. Pay attention to each area included in the frame in the opposite order to the order in which the area is focused when detecting the motion vector, and one of the motion vectors assigned to the surrounding area in the focused area Including assigning a vector.

本発明の一側面においては、ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域が着目され、勾配法により動きベクトルが検出される。また、生成対象となる第2のフレームに含まれるそれぞれの領域に、動きベクトルの検出のときに領域に着目される順序と逆の順序で着目され、着目された領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルが割り付けられる。   In one aspect of the present invention, attention is paid to each region included in the first frame in raster order or reverse raster order, and a motion vector is detected by a gradient method. In addition, attention is paid to each area included in the second frame to be generated in an order opposite to the order in which the areas are noticed when the motion vector is detected, and the attention areas are assigned to the surrounding areas. One of the motion vectors being assigned is assigned.

本発明の一側面によれば、より精度の高い動きベクトルを選択することができる。   According to one aspect of the present invention, a motion vector with higher accuracy can be selected.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、発明の詳細な説明に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、発明の詳細な説明に記載されていることを確認するためのものである。従って、発明の詳細な説明中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が発明に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between the configuration requirements of the present invention and the embodiments described in the detailed description of the present invention are exemplified as follows. This description is to confirm that the embodiments supporting the present invention are described in the detailed description of the invention. Accordingly, although there are embodiments that are described in the detailed description of the invention but are not described here as embodiments corresponding to the constituent elements of the present invention, It does not mean that the embodiment does not correspond to the configuration requirements. On the contrary, even if an embodiment is described herein as corresponding to the invention, this does not mean that the embodiment does not correspond to other than the configuration requirements. .

本発明の一側面の画像処理装置は、ラスタ順、または逆ラスタ順に第1のフレーム(例えば、時刻tのフレーム)に含まれるそれぞれの領域(ブロック、画素)に着目し、勾配法により動きベクトルを検出する検出手段(例えば、図1のベクトル検出部12)と、生成対象となる第2のフレーム(例えば、内挿フレーム)に含まれるそれぞれの領域に、前記検出手段が領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付ける割付手段(例えば、図1の割付補償部17)とを備える。   An image processing apparatus according to an aspect of the present invention focuses on each region (block, pixel) included in a first frame (for example, a frame at time t) in raster order or reverse raster order, and uses a gradient method to calculate a motion vector. The detection means (for example, the vector detection unit 12 in FIG. 1) and the order in which the detection means pays attention to the respective areas included in the second frame (for example, the interpolation frame) to be generated And allocating means (for example, the allocation compensator 17 in FIG. 1) that allocates one motion vector among the motion vectors allocated to the peripheral region to the focused region.

前記第1のフレームの第1の演算対象範囲と、前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルによって前記第1の演算対象範囲と対応付けられる前記第1のフレームから時間的に後の第3のフレームの第2の演算対象範囲との相関(例えば、式(1)で表される差分絶対値和)を求める演算手段(例えば、図36の評価値演算部142)をさらに設けることができる。この場合、前記割付手段には、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択させることができる。   The first calculation target range of the first frame and the first calculation unit associated with the first calculation target range by a motion vector assigned to a region around the region of interest in the second frame. 36 (for example, the evaluation value of FIG. 36) for obtaining a correlation (for example, the sum of absolute differences represented by the expression (1)) with the second calculation target range of the third frame temporally after the frame of A calculation unit 142) can be further provided. In this case, the allocating unit can select one motion vector from among the motion vectors allocated to the peripheral region based on the correlation obtained by the calculating unit.

前記第1のフレームの所定の位置を基準として設定された第1の演算対象範囲内の各画素の画素値から前記第1の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第1の演算対象範囲内の各画素の画素値と、前記第1のフレームから時間的に後の第3のフレームの、前記所定の位置に対応する位置から前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルに従って求められる第2の演算対象範囲内の各画素の画素値から前記第2の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第2の演算対象範囲内の各画素の画素値とから、前記第1と第2の演算対象範囲の相関(例えば、式(13)で表される偏差DFD)を求める演算手段(例えば、図36の評価値演算部142)をさらに設けることができる。この場合、前記割付手段には、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択させることができる。   Obtained by subtracting the average value of the pixel values of the pixels within the first calculation target range from the pixel values of the pixels within the first calculation target range set with the predetermined position of the first frame as a reference. Focused on the second frame from the position corresponding to the predetermined position of the third frame temporally after the first frame and the pixel value of each pixel in the first calculation target range Obtained by subtracting the average value of the pixel values of the pixels in the second calculation target range from the pixel values of the pixels in the second calculation target range obtained according to the motion vector assigned to the area around the area. Calculating means (for example, a deviation DFD represented by the equation (13)) between the first calculation target range and the pixel value of each pixel in the second calculation target range. 36, the evaluation value calculation unit 142) of FIG. It can be provided to. In this case, the allocating unit can select one motion vector from among the motion vectors allocated to the peripheral region based on the correlation obtained by the calculating unit.

本発明の一側面の情報処理装置またはプログラムは、ラスタ順、または逆ラスタ順に第1のフレーム(例えば、時刻tのフレーム)に含まれるそれぞれの領域(ブロック、画素)に着目し、勾配法により動きベクトルを検出するステップ(例えば、図5のステップS2)と、生成対象となる第2のフレーム(例えば、内挿フレーム)に含まれるそれぞれの領域に、動きベクトルの検出のときに領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付けるステップ(例えば、図5のステップS4)とを含む。   An information processing apparatus or program according to one aspect of the present invention focuses on each region (block, pixel) included in a first frame (for example, a frame at time t) in raster order or reverse raster order, and uses a gradient method. Attention is paid to each region included in the step of detecting a motion vector (for example, step S2 in FIG. 5) and each region included in the second frame (for example, interpolation frame) to be generated. And a step of assigning one of the motion vectors assigned to the surrounding region to the region of interest (for example, step S4 in FIG. 5).

以下、本発明の実施の形態について図を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態に係る信号処理装置1の構成例を示すブロック図である。図1に示される各構成は、ハードウエア的に実現されるようにしてもよいし、ソフトウエア的に実現されるようにしてもよい。   FIG. 1 is a block diagram illustrating a configuration example of a signal processing device 1 according to an embodiment of the present invention. Each configuration shown in FIG. 1 may be realized by hardware or may be realized by software.

信号処理装置1においては、例えば、フレーム周波数24Hzのプログレッシブ画像信号(24P信号)が入力され、入力された信号が、フレーム周波数60Hzのプログレッシブ画像信号(60P信号)に変換されて出力される。信号処理装置1に入力された24P信号の入力画像は、フレームメモリ11、ベクトル検出部12、ベクトル割付部14、割付補償部17、および画像補間部18に供給される。   In the signal processing device 1, for example, a progressive image signal (24P signal) with a frame frequency of 24 Hz is input, and the input signal is converted into a progressive image signal (60P signal) with a frame frequency of 60 Hz and output. The input image of the 24P signal input to the signal processing device 1 is supplied to the frame memory 11, the vector detection unit 12, the vector allocation unit 14, the allocation compensation unit 17, and the image interpolation unit 18.

フレームメモリ11は、時刻t+1のフレーム(画像)の1つ前の時刻のフレームである時刻tのフレームを記憶する。フレームメモリ11に記憶された時刻tのフレームは、ベクトル検出部12、ベクトル割付部14、割付補償部17、および画像補間部18に出力される。以下、時刻tのフレームをフレームtといい、時刻t+1のフレームをフレームt+1という。   The frame memory 11 stores a frame at time t, which is a frame at the time immediately before the frame (image) at time t + 1. The frame at time t stored in the frame memory 11 is output to the vector detection unit 12, the vector allocation unit 14, the allocation compensation unit 17, and the image interpolation unit 18. Hereinafter, the frame at time t is referred to as frame t, and the frame at time t + 1 is referred to as frame t + 1.

ベクトル検出部12は、フレームメモリ11に記憶されているフレームtの着目ブロックと、フレームt+1の対象ブロックの間で動きベクトルを検出し、検出した動きベクトルを検出ベクトルメモリ13に記憶させる。この2フレーム間の動きベクトルの検出には勾配法やブロックマッチング法などが用いられる。ベクトル検出部12の構成の詳細については後述する。   The vector detection unit 12 detects a motion vector between the target block of the frame t stored in the frame memory 11 and the target block of the frame t + 1, and stores the detected motion vector in the detection vector memory 13. A gradient method or a block matching method is used to detect the motion vector between the two frames. Details of the configuration of the vector detection unit 12 will be described later.

検出ベクトルメモリ13は、フレームtを対象としてベクトル検出部12により検出された動きベクトルを記憶する。   The detection vector memory 13 stores the motion vector detected by the vector detection unit 12 with respect to the frame t.

ベクトル割付部14は、24P信号のフレームt上において求められた動きベクトルを、割付ベクトルメモリ15に記憶されている、補間する60P信号のフレーム上の画素に割り付ける。以下、適宜、60P信号のフレームを内挿フレームともいう。   The vector allocation unit 14 allocates the motion vector obtained on the frame t of the 24P signal to the pixel on the frame of the 60P signal to be interpolated, which is stored in the allocation vector memory 15. Hereinafter, the frame of the 60P signal is also referred to as an interpolation frame as appropriate.

また、ベクトル割付部14は、動きベクトルを内挿フレームに割り付けたとき、割付フラグメモリ16に記憶されている、動きベクトルを割り付けた画素の割付フラグを1(True)に書き換える。割付フラグは、それぞれの画素の動きベクトルの割り付けの有無を示すものである。例えば、True(1)の割付フラグは、対応する画素に動きベクトルが割り付けられていることを示し、False(0)の割付フラグは、対応する画素に動きベクトルが割り付けられていないことを示す。ベクトル割付部14の構成の詳細については後述する。   Further, when the motion vector is allocated to the interpolation frame, the vector allocation unit 14 rewrites the allocation flag of the pixel allocated with the motion vector stored in the allocation flag memory 16 to 1 (True). The allocation flag indicates whether or not the motion vector of each pixel is allocated. For example, an allocation flag of True (1) indicates that a motion vector is allocated to the corresponding pixel, and an allocation flag of False (0) indicates that a motion vector is not allocated to the corresponding pixel. Details of the configuration of the vector allocation unit 14 will be described later.

割付ベクトルメモリ15は、ベクトル割付部14により内挿フレームの画素に割り付けられた動きベクトル(以下、適宜、割付ベクトルという)を記憶する。   The allocation vector memory 15 stores a motion vector (hereinafter, appropriately referred to as an allocation vector) allocated to the pixels of the interpolation frame by the vector allocation unit 14.

割付フラグメモリ16は、内挿フレームの画素毎に割付フラグを記憶する。   The allocation flag memory 16 stores an allocation flag for each pixel of the interpolation frame.

割付補償部17は、割付フラグメモリ16に記憶されている割付フラグを参照し、ベクトル割付部14により動きベクトルが割り付けられなかった画素が内挿フレームにある場合、その画素に、周辺画素の動きベクトルを割り付ける(補う)。動きベクトルを新たに割り付けたとき、割付補償部17は、割付フラグメモリ16に記憶されている、そ動きベクトルを割り付けた画素の割付フラグを1(True)に書き換える。割付補償部17の構成の詳細については後述する。   The allocation compensator 17 refers to the allocation flag stored in the allocation flag memory 16, and when a pixel to which no motion vector is allocated by the vector allocation unit 14 is in the interpolation frame, the motion of the surrounding pixels is included in that pixel. Allocate (complement) a vector. When a motion vector is newly allocated, the allocation compensator 17 rewrites the allocation flag of the pixel allocated with the motion vector stored in the allocation flag memory 16 to 1 (True). Details of the configuration of the allocation compensation unit 17 will be described later.

画像補間部18は、割付ベクトルメモリ15に記憶されている、内挿フレームのそれぞれの画素に割り付けられた動きベクトルと、フレームt,t+1の画素値(例えば、輝度値)を用いて、内挿フレームの画素値を補間生成する。画像補間部18は、生成した内挿フレームを出力し、その次に、必要に応じてフレームt+1を出力することにより、60P信号を後段に出力する。   The image interpolation unit 18 uses the motion vector stored in the allocation vector memory 15 and allocated to each pixel of the interpolation frame and the pixel values (for example, luminance values) of the frames t and t + 1. The pixel value of the interpolation frame is generated by interpolation. The image interpolation unit 18 outputs the generated interpolation frame, and then outputs the frame t + 1 as necessary, thereby outputting the 60P signal to the subsequent stage.

図2は、フレームの内挿の例を示す図である。   FIG. 2 is a diagram illustrating an example of frame interpolation.

図2においては、点線が、信号処理装置1に入力される、時刻t,t+1,t+2の24P信号のフレームを表し、実線が、信号処理装置1において生成されて出力される、時刻t,t+0.4,t+0.8,t+1.2,t+1.6,t+2の60P信号のフレームを表す。   In FIG. 2, a dotted line represents a frame of a 24P signal at time t, t + 1, t + 2 input to the signal processing device 1, and a solid line is generated and output in the signal processing device 1. It represents a frame of 60P signal at time t, t + 0.4, t + 0.8, t + 1.2, t + 1.6, t + 2.

一般に、24P信号を60P信号に変換するためには、60/24(5/2)倍のフレーム、すなわち、入力された2つのフレームから5つのフレームを生成する必要がある。このとき、60P信号の内挿フレームは、それぞれのフレーム間隔を等しくするために、24P信号上での時間位相が0.0,0.4,0.8,1.2、および1.6となる位置に配置される。この中で、時間位相が0.0である時刻tの1フレームを除く4フレーム(t+0.4,t+0.8,t+1.2,およびt+1.6のフレーム)は24P信号上には存在しない画像である。   Generally, in order to convert a 24P signal to a 60P signal, it is necessary to generate 60/24 (5/2) times frames, that is, five frames from two input frames. At this time, the interpolated frames of the 60P signal are arranged at positions where the time phases on the 24P signal are 0.0, 0.4, 0.8, 1.2, and 1.6 in order to equalize the respective frame intervals. Among these, four frames (frames of t + 0.4, t + 0.8, t + 1.2, and t + 1.6) except for one frame at time t with a time phase of 0.0 are images that do not exist on the 24P signal. .

したがって、信号処理装置1においては、24P信号の画像が入力されると、24P信号の時刻tおよび時刻t+1の2つのフレームから4つの内挿フレームが生成され、時刻t,t+0.4,t+0.8,t+1.2,およびt+1.6の5つのフレームからなる60P信号が出力される。   Therefore, in the signal processing device 1, when an image of the 24P signal is input, four interpolation frames are generated from the two frames at the time t and the time t + 1 of the 24P signal, and the time t, t + 0.4, A 60P signal composed of five frames t + 0.8, t + 1.2, and t + 1.6 is output.

これにより、24P信号から60P信号へのフレーム周波数変換が実現される。   Thereby, the frame frequency conversion from the 24P signal to the 60P signal is realized.

なお、原理的には、24P信号の時刻tと時刻t+1の2つのフレームから、時刻t,t+0.4,t+0.8,t+1.2、およびt+1.6の5つの60P信号のフレームが新しく生成されるが、実際には、図2の例の場合、24P信号の時刻tと時刻t+1の2つのフレームに基づいて、t,t+0.4,t+0.8の60P信号のフレームが生成され、24P信号の時刻t+1とt+2の2つのフレームに基づいて、t+1.2,t+1.6、およびt+2の60P信号のフレームが生成される。   In principle, there are five 60P signal frames at times t, t + 0.4, t + 0.8, t + 1.2, and t + 1.6 from two frames at time t and time t + 1 of the 24P signal. In the case of the example of FIG. 2, a 60P signal frame of t, t + 0.4, t + 0.8 is actually generated based on two frames of time t and time t + 1 of the 24P signal. Based on the two frames at the times t + 1 and t + 2 of the 24P signal, frames of the 60P signal of t + 1.2, t + 1.6, and t + 2 are generated.

図3は、信号処理装置1において行われる一連の処理を説明する図である。   FIG. 3 is a diagram for explaining a series of processes performed in the signal processing apparatus 1.

図3において、太線矢印は状態の遷移を表し、矢印Tはそれぞれの状態における時間の経過方向を表す。また、状態S1乃至S5は、信号処理装置1を構成する各部への入力時、各部からの出力時における、24P信号のフレームt、フレームt+1、または、フレームtとフレームt+1の間に生成される60P信号の内挿フレームFの状態を表している。すなわち、実際には、例えば、状態S2に示されるような動きベクトルが検出されたフレームは入力されず、フレームと、検出された動きベクトルは別々に入力される。   In FIG. 3, a thick arrow represents a state transition, and an arrow T represents a time passage direction in each state. In addition, states S1 to S5 indicate that the 24P signal is in frame t, frame t + 1, or between frame t and frame t + 1 at the time of input to each part of signal processing apparatus 1 and at the time of output from each part. The state of the interpolation frame F of the 60P signal produced | generated is shown. That is, in practice, for example, a frame in which a motion vector is detected as shown in the state S2 is not input, and the frame and the detected motion vector are input separately.

状態S1は、ベクトル検出部12に入力される、24P信号のフレームt,t+1の状態を表す。フレームt上の黒点は画素を表している。   The state S1 represents the state of the frames t and t + 1 of the 24P signal input to the vector detection unit 12. Black dots on the frame t represent pixels.

ベクトル検出部12は、フレームt上の画素が、次の時刻のフレームt+1において、どの位置に移動するかを検出し、検出した動きを、各画素に対応する動きベクトルとして出力する。1つの画素に対応するものとして複数の動きベクトルが検出された場合、ベクトル検出部12は、それぞれの動きベクトルについて評価値を求め、求めた評価値に基づいて1つの動きベクトルを選択する。   The vector detection unit 12 detects to which position the pixel on the frame t moves in the frame t + 1 at the next time, and outputs the detected motion as a motion vector corresponding to each pixel. When a plurality of motion vectors are detected as corresponding to one pixel, the vector detection unit 12 obtains an evaluation value for each motion vector, and selects one motion vector based on the obtained evaluation value.

状態S2は、ベクトル割付部14に入力される、フレームt,t+1の状態を表す。状態S2において、フレームtの各画素から延びている矢印は、ベクトル検出部12により検出された動きベクトルを表している。   The state S2 represents the state of the frames t and t + 1 that are input to the vector allocation unit 14. In the state S2, an arrow extending from each pixel of the frame t represents a motion vector detected by the vector detection unit 12.

ベクトル割付部14は、フレームtの各画素において検出された動きベクトルを、次のフレームt+1まで延長させ、予め設定されている時間位相(例えば、図2のt+0.4)にある内挿フレームF上のどの位置を通過するかを求める。これは、フレームtとフレームt+1の間において、ある画素が一定の動きをとるものとすると、動きベクトルが内挿フレームFを通過した点が、その、ある画素に対応する、内挿フレームFの画素位置となるためである。   The vector allocating unit 14 extends the motion vector detected at each pixel of the frame t to the next frame t + 1, and performs interpolation at a preset time phase (for example, t + 0.4 in FIG. 2). Which position on the frame F is passed through is determined. This is because an interpolation frame in which a point at which a motion vector passes through the interpolation frame F corresponds to the certain pixel when a certain pixel takes a certain motion between the frame t and the frame t + 1. This is because the pixel position is F.

例えば、ベクトル割付部14は、この通過する動きベクトルを、内挿フレームF上の通過点の近傍4画素に割り付ける。このとき、内挿フレームの画素によっては、動きベクトルが存在しない場合、あるいは、複数の動きベクトルが割付候補となる場合があり、後者のような場合には、ベクトル割付部14は、それぞれの動きベクトルについての評価値を求め、求めた評価値に基づいて、割り付ける1つの動きベクトルを選択する。   For example, the vector assigning unit 14 assigns the passing motion vector to four pixels in the vicinity of the passing point on the interpolation frame F. At this time, depending on the pixels of the interpolated frame, there may be no motion vector or a plurality of motion vectors may be allocation candidates. In the latter case, the vector allocation unit 14 An evaluation value for the vector is obtained, and one motion vector to be assigned is selected based on the obtained evaluation value.

状態S3は、割付補償部17に入力される、フレームt,t+1、および、内挿フレームFの状態を表す。状態S3の内挿フレームFにおいては、動きベクトルが割り付けられている画素と、割り付けられていない画素が存在する。   The state S3 represents the states of the frames t and t + 1 and the interpolation frame F that are input to the allocation compensator 17. In the interpolation frame F in the state S3, there are pixels to which a motion vector is assigned and pixels to which no motion vector is assigned.

割付補償部17は、動きベクトルが割り付けられていない画素に対して、その画素の周辺画素に割り付けられている動きベクトルを用いて補う。これは、ある着目画素の近傍領域が、その着目画素と同じ動きをとるという仮定が成り立つならば、着目画素の動きベクトルは、周辺画素の動きベクトルと似たものになると考えられるからである。   The allocation compensation unit 17 compensates for a pixel to which no motion vector is allocated, using the motion vector allocated to the peripheral pixels of the pixel. This is because the motion vector of the pixel of interest is considered to be similar to the motion vector of the surrounding pixels if the assumption that a region near the pixel of interest has the same motion as that of the pixel of interest holds.

このように、周辺画素の動きベクトルを割り付けることにより、動きベクトルが割り付けられなかった画素にもある程度正確な動きベクトルが与えられ、内挿フレームFのすべての画素に動きベクトルが割り付けられる。複数の動きベクトルが着目画素の動きベクトルの候補として存在する場合、割付補償部17は、それぞれの動きベクトルについての評価値を求め、求めた評価値に基づいて、割り付ける1つの動きベクトルを選択する。   In this way, by assigning motion vectors of peripheral pixels, a motion vector that is accurate to some extent is also given to pixels that have not been assigned a motion vector, and motion vectors are assigned to all the pixels of the interpolation frame F. When a plurality of motion vectors exist as motion vector candidates for the pixel of interest, the allocation compensator 17 obtains an evaluation value for each motion vector and selects one motion vector to be assigned based on the obtained evaluation value. .

状態S4は、画像補間部18に入力される、フレームt,t+1、および、内挿フレームFの状態を表す。状態S4の内挿フレームFにおいては、すべての画素に動きベクトルが割り付けられている。   The state S4 represents the state of the frames t and t + 1 and the interpolation frame F that are input to the image interpolation unit 18. In the interpolation frame F in the state S4, motion vectors are assigned to all the pixels.

このように、すべての画素に動きベクトルが割り付けられていることにより、画像補間部18は、内挿フレームF上の画素と、フレームtおよびフレームt+1の画素の位置関係を決定することができる。   As described above, since the motion vector is assigned to all the pixels, the image interpolation unit 18 can determine the positional relationship between the pixels on the interpolation frame F and the pixels of the frame t and the frame t + 1. it can.

画像補間部18は、内挿フレームF上に割り付けられた動きベクトルと、フレームt,t+1の画素値を用いて、内挿フレームFのそれぞれの画素の画素値を補間生成し、フレームt、生成した内挿フレームF、およびフレームt+1をそれぞれ所定のタイミングで出力する。これにより、60P信号が信号処理装置1から出力される。   The image interpolation unit 18 generates a pixel value of each pixel of the interpolation frame F by using the motion vector allocated on the interpolation frame F and the pixel values of the frames t and t + 1, and generates the frame t The generated interpolation frame F and frame t + 1 are each output at a predetermined timing. As a result, the 60P signal is output from the signal processing device 1.

ここで、図4を参照して、動きベクトルの選択の際に用いられる評価値について説明する。   Here, with reference to FIG. 4, an evaluation value used in selecting a motion vector will be described.

上述したように、信号処理装置1の各部(ベクトル検出部12、ベクトル割付部14、および割付補償部17)においては、後段の処理で用いられる動きベクトルを選択するとき、その指標となる動きベクトルの評価値として、例えば、2つのフレームの着目するベクトル量分ずらしたブロック間の相関値を表す差分絶対値和(DFD(Displaced Frame Difference))が用いられる。   As described above, in each unit of the signal processing device 1 (the vector detection unit 12, the vector allocation unit 14, and the allocation compensation unit 17), when selecting a motion vector used in subsequent processing, a motion vector serving as an index thereof As the evaluation value, for example, a sum of absolute differences (DFD (Displaced Frame Difference)) representing a correlation value between blocks shifted by the vector amount of interest of two frames is used.

図4の例においては、フレームt上の画素位置pを中心としたm×nのブロックと、フレームt+1上の画素位置pから、着目する動きベクトルv(候補となっている動きベクトル)のベクトル量分ずらした画素位置p+vを中心としたm×nのブロックが示されており、これらのブロック間において求められる差分絶対値和DFDt(p)は次式(1)で表される。 In the example of FIG. 4, a motion vector v (candidate motion vector) of interest from an m × n block centered on the pixel position p on the frame t and the pixel position p on the frame t + 1. An m × n block centered on a pixel position p + v shifted by the vector amount is shown, and the sum of absolute differences DFD t (p) obtained between these blocks is expressed by the following equation (1). Is done.

Figure 0004655215
Figure 0004655215

ここで、Ft(p)は、時刻tにおける画素位置pの輝度値を表し、m×nは、差分絶対値和を求めるためのDFD演算範囲(ブロック)を表す。差分絶対値和は2つのフレームにおけるブロック間の相関値を表しているため、通常、この差分絶対値和が小さいほどフレーム間のブロックの波形が一致し、動きベクトルvの信頼度が高いといえる。したがって、信号処理装置1の各部においては、このように信頼度が高い動きベクトルvが、後段の処理に最適な動きベクトルとして選択される。 Here, F t (p) represents a luminance value at the pixel position p at time t, and m × n represents a DFD calculation range (block) for obtaining a sum of absolute differences. Since the difference absolute value sum represents the correlation value between the blocks in two frames, it can be said that the smaller the difference absolute value sum, the more the waveforms of the blocks between the frames match and the higher the reliability of the motion vector v. . Therefore, in each part of the signal processing device 1, the motion vector v having such a high reliability is selected as a motion vector optimal for the subsequent processing.

次に、図5のフローチャートを参照して、信号処理装置1のフレーム周波数変換処理について説明する。   Next, the frame frequency conversion process of the signal processing apparatus 1 will be described with reference to the flowchart of FIG.

ステップS1において、ベクトル検出部12は、フレームt+1と、フレームメモリ11に記憶されているフレームtの画素値を取得する。フレームt+1と、フレームメモリ11に記憶されているフレームtの画素値は、ベクトル割付部14、割付補償部17、および画像補間部18にも供給される。   In step S <b> 1, the vector detection unit 12 acquires the pixel value of the frame t + 1 and the frame t stored in the frame memory 11. Pixel values of the frame t + 1 and the frame t stored in the frame memory 11 are also supplied to the vector allocation unit 14, the allocation compensation unit 17, and the image interpolation unit 18.

ステップS2において、ベクトル検出部12は動きベクトル検出処理を行う。この処理により、フレームtの着目ブロックと、フレームt+1の対象ブロックの間で動きベクトルが検出され、検出された動きベクトルが検出ベクトルメモリ13に記憶される。   In step S2, the vector detection unit 12 performs a motion vector detection process. With this process, a motion vector is detected between the target block of frame t and the target block of frame t + 1, and the detected motion vector is stored in the detection vector memory 13.

ステップS3において、ベクトル割付部14はベクトル割付処理を行う。この処理により、フレームt上において求められた動きベクトルが内挿フレームの画素に割り付けられる。割り付けられた動きベクトルは、画素と対応付けて割付ベクトルメモリ15に記憶される。   In step S3, the vector allocation unit 14 performs vector allocation processing. By this processing, the motion vector obtained on the frame t is assigned to the pixel of the interpolation frame. The assigned motion vector is stored in the assigned vector memory 15 in association with the pixel.

ステップS4において、割付補償部17は割付補償処理を行う。この処理により、ベクトル割付部14により動きベクトルが割り付けられなかった画素に対して、その画素の周辺画素の動きベクトルが割り付けられる。   In step S4, the allocation compensator 17 performs allocation compensation processing. With this process, the motion vectors of the peripheral pixels of the pixel are assigned to the pixels to which no motion vector is assigned by the vector assigning unit 14.

ステップS5において、画像補間部18は画像補間処理を行う。この処理により、内挿フレームに割り付けられた動きベクトルと、フレームt,t+1の画素値を用いて、内挿フレームの画素値が補間生成される。   In step S5, the image interpolation unit 18 performs an image interpolation process. By this processing, the pixel value of the interpolation frame is generated by interpolation using the motion vector assigned to the interpolation frame and the pixel values of the frames t and t + 1.

ステップS2乃至S5において行われる動きベクトル検出処理、ベクトル割付処理、割付補償処理、画像補間処理については後に詳述する。   The motion vector detection processing, vector allocation processing, allocation compensation processing, and image interpolation processing performed in steps S2 to S5 will be described in detail later.

ステップS6において、画像補間部18は、生成された内挿フレームを出力し、その次に、必要に応じてフレームt+1を出力することにより、60P信号の画像を後段に出力する。   In step S6, the image interpolation unit 18 outputs the generated interpolation frame, and then outputs a frame t + 1 as necessary, thereby outputting an image of the 60P signal to the subsequent stage.

ステップS7において、ベクトル検出部12は、すべてのフレームの処理が終了したか否かを判定し、すべてのフレームの処理が終了していないと判定した場合、ステップS1に戻り、それ以降の処理を繰り返す。ベクトル検出部12は、ステップS7において、すべてのフレームの処理が終了したと判定した場合、処理を終了させる。   In step S7, the vector detection unit 12 determines whether or not the processing of all the frames has been completed. If it is determined that the processing of all the frames has not been completed, the vector detection unit 12 returns to step S1 and performs the subsequent processing. repeat. If the vector detection unit 12 determines in step S7 that all the frames have been processed, the vector detection unit 12 ends the processing.

以上のように、信号処理装置1においては、基本的に、動きベクトルを検出する処理、検出した動きベクトルを内挿フレーム上の画素に割り付ける処理、動きベクトルが割り付けられていない内挿フレームの画素に動きベクトルを補償する処理、および、割り付けられた動きベクトルと2つのフレームの画素値から内挿フレームを補間生成する処理の4つの処理が行われる。以下、それぞれの処理、および、それを実現する構成の詳細について順に説明する。   As described above, in the signal processing device 1, basically, a process for detecting a motion vector, a process for assigning the detected motion vector to a pixel on the interpolation frame, and a pixel in an interpolation frame to which no motion vector is assigned. The following four processes are performed: a process for compensating the motion vector, and a process for interpolating and generating an interpolation frame from the allocated motion vector and the pixel values of the two frames. Hereinafter, each process and the detail of the structure which implement | achieves it are demonstrated in order.

はじめに、動きベクトルの検出について説明する。   First, motion vector detection will be described.

図6は、図1のベクトル検出部12の構成例を示すブロック図である。   FIG. 6 is a block diagram illustrating a configuration example of the vector detection unit 12 of FIG.

上述したように、ベクトル検出部12においては、入力されるフレームtとフレームt+1を用いてフレームt上の各画素の動きベクトルが検出される。この動きベクトルを検出する処理は、例えば、複数の画素からなるブロック毎に実行される。   As described above, the vector detection unit 12 detects the motion vector of each pixel on the frame t using the input frame t and frame t + 1. The process of detecting the motion vector is executed for each block including a plurality of pixels, for example.

初期ベクトル選択部31は、検出ベクトルメモリ13に記憶されている、過去に求められた周辺のブロック(周辺領域)の動きベクトルや、シフト初期ベクトルメモリ37に記憶されているシフト初期ベクトルを初期ベクトルの候補(以下、適宜、初期候補ベクトルともいう)として選択する。   The initial vector selection unit 31 uses the motion vectors of peripheral blocks (peripheral areas) obtained in the past, stored in the detection vector memory 13, and the shifted initial vectors stored in the shifted initial vector memory 37 as initial vectors. As candidates (hereinafter also referred to as initial candidate vectors as appropriate).

また、初期ベクトル選択部31は、それぞれの初期候補ベクトルの評価値DFDを求め、評価値DFDに基づいて選択した、最も信頼度が高い初期候補ベクトルを初期ベクトルV0として反復勾配法演算部33に出力する。   Further, the initial vector selection unit 31 obtains the evaluation value DFD of each initial candidate vector, and selects the initial candidate vector with the highest reliability selected based on the evaluation value DFD as the initial vector V0 to the iterative gradient method calculation unit 33. Output.

プリフィルタ32−1および32−2はローパスフィルタやガウシアンフィルタにより構成され、それぞれ、入力されるフレームt,t+1のノイズ成分を除去し、ノイズ成分を除去して得られたフレームt,t+1を反復勾配法演算部33に出力する。   The pre-filters 32-1 and 32-2 are composed of a low-pass filter and a Gaussian filter, and remove noise components from the input frames t and t + 1, respectively, and obtain frames t and t obtained by removing the noise components. +1 is output to the iterative gradient method computing unit 33.

反復勾配法演算部33は、初期ベクトル選択部31から供給されてきた初期ベクトルV0と、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、所定のブロック毎に、動きベクトルVnを勾配法により算出し、初期ベクトルV0と、算出した動きベクトルVnをベクトル評価部34に出力する。   The iterative gradient method computing unit 33 uses the initial vector V0 supplied from the initial vector selection unit 31 and the frames t and t + 1 supplied from the prefilters 32-1 and 32-2 to generate a predetermined block. Each time, the motion vector Vn is calculated by the gradient method, and the initial vector V0 and the calculated motion vector Vn are output to the vector evaluation unit 34.

ベクトル評価部34は、反復勾配法演算部33により求められた動きベクトルVn-1(または初期ベクトルV0)と動きベクトルVnの評価値DFDを求め、求めた評価値DFDから、信頼度が高いと考えられる動きベクトルVnが求められるまで、勾配法の演算を反復勾配法演算部33に繰り返し実行させる。   The vector evaluation unit 34 obtains the motion vector Vn-1 (or initial vector V0) obtained by the iterative gradient method computing unit 33 and the evaluation value DFD of the motion vector Vn, and if the reliability is high from the obtained evaluation value DFD, Until the possible motion vector Vn is obtained, the iterative gradient method computing unit 33 is repeatedly executed with the gradient method.

また、ベクトル評価部34は、信頼度が高いと考えられるベクトルが反復勾配法演算部33により求められたとき、それを動きベクトルVとして検出ベクトルメモリ13に記憶させるとともに、その動きベクトルVと、動きベクトルVの評価値DFDをシフト初期ベクトル割付部35に出力する。   Further, the vector evaluation unit 34, when a vector considered to have high reliability is obtained by the iterative gradient method computing unit 33, stores it in the detection vector memory 13 as a motion vector V, and the motion vector V, The evaluation value DFD of the motion vector V is output to the shifted initial vector allocation unit 35.

シフト初期ベクトル割付部35は、動きベクトルVと評価値DFDがベクトル評価部34から供給されてきたとき、次のフレーム上の着目ブロックを通過する動きベクトルを、その着目ブロックにシフトさせたシフト初期ベクトルとして設定し、シフト初期ベクトルメモリ37に記憶させる。例えば、シフト初期ベクトル割付部35は、動きベクトルVの終点のブロックと同じ位置の次のフレーム上の着目ブロックを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトルをシフト初期ベクトルとして設定する。   When the motion vector V and the evaluation value DFD are supplied from the vector evaluation unit 34, the shift initial vector allocation unit 35 shifts the motion vector passing through the block of interest on the next frame to the block of interest. This is set as a vector and stored in the shifted initial vector memory 37. For example, the shift initial vector allocating unit 35 uses a motion vector having the same size and the same direction as the motion vector V, starting from the target block on the next frame at the same position as the end block of the motion vector V. Set as.

評価値メモリ36は、シフト初期ベクトルの候補の評価値DFDをブロック毎に記憶する。   The evaluation value memory 36 stores the evaluation value DFD of the shifted initial vector candidate for each block.

シフト初期ベクトルメモリ37は、最も評価値DFDが小さい動きベクトルを、シフト初期ベクトルとしてそれぞれのブロックに対応させて記憶する。   The shifted initial vector memory 37 stores a motion vector having the smallest evaluation value DFD in association with each block as a shifted initial vector.

ここで、ベクトル検出部12を構成する初期ベクトル選択部31、反復勾配法演算部33、およびシフト初期ベクトル割付部35の詳細について説明する。   Here, the details of the initial vector selection unit 31, the iterative gradient method calculation unit 33, and the shifted initial vector allocation unit 35 constituting the vector detection unit 12 will be described.

図7は、初期ベクトル選択部31の構成例を示すブロック図である。   FIG. 7 is a block diagram illustrating a configuration example of the initial vector selection unit 31.

候補ベクトル位置演算部51は、フレームt上の処理の対象となる着目ブロックを選択し、着目ブロックの周辺領域から、着目ブロックの初期候補ベクトルを取得する候補ブロックの位置、初期候補ベクトルとなる動きベクトルの種類、および優先順位を求め、求めた優先順位の順に、候補ブロックの位置情報と初期候補ベクトルの種類情報を検出ベクトル取得部52とシフト初期ベクトル取得部53に出力する。初期候補ベクトルの数、候補ブロックの位置、初期候補ベクトルの種類、および優先順位はあらかじめ設定されている。   The candidate vector position calculation unit 51 selects a target block to be processed on the frame t, acquires the initial candidate vector of the target block from the peripheral area of the target block, and the motion as the initial candidate vector Vector types and priorities are obtained, and candidate block position information and initial candidate vector type information are output to the detected vector obtaining unit 52 and the shifted initial vector obtaining unit 53 in the order of the obtained priorities. The number of initial candidate vectors, the positions of candidate blocks, the types of initial candidate vectors, and priorities are set in advance.

また、候補ベクトル位置演算部51は、候補ブロックの位置情報をオフセット位置演算部54にも供給する。   The candidate vector position calculation unit 51 also supplies the position information of the candidate block to the offset position calculation unit 54.

例えば、候補ベクトル位置演算部51は、あらかじめ設定された初期候補ベクトルの種類が過去ベクトルまたは現在ベクトル(ベクトルの種類については後述する)である場合、候補ブロックの位置情報と初期候補ベクトルの種類情報を検出ベクトル取得部52に出力し、初期候補ベクトルの種類がシフト初期ベクトルである場合、候補ブロックの位置情報と初期候補ベクトルの種類情報をシフト初期ベクトル取得部53に出力する。また、そのどちらでもなかった場合(例えば、初期候補ベクトルの種類が0ベクトルである場合)、候補ベクトル位置演算部51は、0ベクトルとともに、候補ブロックの位置情報をオフセット位置演算部54に出力する。   For example, if the preset type of the initial candidate vector is a past vector or a current vector (the vector type will be described later), the candidate vector position calculation unit 51 determines the position information of the candidate block and the type information of the initial candidate vector. When the initial candidate vector type is a shifted initial vector, the position information of the candidate block and the initial candidate vector type information are output to the shifted initial vector acquiring unit 53. If neither of them is present (for example, when the type of the initial candidate vector is 0 vector), the candidate vector position calculation unit 51 outputs the position information of the candidate block together with the 0 vector to the offset position calculation unit 54. .

図8は、初期ベクトルの候補ブロックとなる周辺領域の例を示す図である。   FIG. 8 is a diagram illustrating an example of a peripheral region that is a candidate block of an initial vector.

図8において、矢印Tは、図中、左手前の時刻t-1の過去フレームt-1から、右奥の時刻tの現在フレームtへの時間の経過方向を示している。図8の例においては、初期ベクトルの候補となり得る周辺領域は、着目するブロックBtを中心とした7×7ブロックにより構成される。各ブロックは例えば4×4画素により構成される。   In FIG. 8, an arrow T indicates the direction of time passage from the past frame t-1 at time t-1 on the left front side to the current frame t at time t on the right back. In the example of FIG. 8, the peripheral region that can be a candidate for the initial vector is configured by 7 × 7 blocks centered on the block Bt of interest. Each block is composed of 4 × 4 pixels, for example.

動きベクトル検出処理は、例えば、フレームの左上のブロックを開始位置として、処理対象のブロックをラスタ順に切り替えて行われる。したがって、初期ベクトル選択部31においては、現在フレームtの着目ブロックBtの動きベクトル検出処理の際には、その直前のブロックまでの動きベクトル検出の結果を、初期ベクトルの候補とすることが可能となる。   The motion vector detection process is performed, for example, by switching the block to be processed in raster order with the upper left block of the frame as the start position. Therefore, in the initial vector selection unit 31, in the motion vector detection processing of the target block Bt in the current frame t, the motion vector detection result up to the block immediately before can be used as the initial vector candidate. Become.

すなわち、着目ブロックBtの周辺領域は、着目ブロックBtよりも前に処理されるブロックCVB、および着目ブロックBtよりも後に処理されるブロックPVBにより構成される。したがって、着目ブロックBtの初期ベクトルを求める場合、初期候補ベクトルは、ブロックCVBの現在フレームt上で検出された動きベクトル(現在ベクトルCV)、および、ブロックPVBの過去フレームt-1上で検出された動きベクトル(過去ベクトルPV)の中から選択することができる。なお、このとき、同じ周辺領域のブロックに割り付けられるシフト初期ベクトルSVも初期候補ベクトルの候補となりうる。   That is, the peripheral area of the block of interest Bt is composed of a block CVB processed before the block of interest Bt and a block PVB processed after the block of interest Bt. Therefore, when obtaining the initial vector of the block of interest Bt, the initial candidate vector is detected on the motion vector (current vector CV) detected on the current frame t of the block CVB and on the past frame t-1 of the block PVB. Motion vector (past vector PV) can be selected. At this time, the shifted initial vector SV allocated to the block in the same peripheral region can also be a candidate for the initial candidate vector.

図9は、候補ベクトル位置演算部51により設定される初期ベクトルの候補ブロックの例を示す図である。   FIG. 9 is a diagram illustrating an example of initial vector candidate blocks set by the candidate vector position calculation unit 51.

図9の例においては、着目ブロックBtの周辺領域のうち、「英字/数字」のシンボルがそれぞれ示されている8個のブロックが、初期候補ベクトルが取得される候補ブロックとしてあらかじめ設定されている。これらのブロックに示されている斜線の前後のシンボルは、「初期候補ベクトルの種類」と「優先順位」をそれぞれ表す。なお、初期候補ベクトルの種類のうち、Pは過去フレームt-1で検出された過去ベクトルPVを表し、Cは現在フレームtで検出された現在ベクトルを表す。また、Sはシフト初期ベクトルSVを表す。   In the example of FIG. 9, eight blocks each having an “alphabet / number” symbol in the peripheral area of the block of interest Bt are set in advance as candidate blocks from which initial candidate vectors are acquired. . Symbols before and after the hatched lines shown in these blocks represent “initial candidate vector type” and “priority”, respectively. Of the types of initial candidate vectors, P represents the past vector PV detected in the past frame t-1, and C represents the current vector detected in the current frame t. S represents a shifted initial vector SV.

着目ブロックBtの「S/1」は、着目ブロックBtに割り付けられたシフト初期ベクトルSVが、初期候補ベクトルとして1番目に用いられることを表す。また、着目ブロックBtの左隣のブロックの「C/2」は、現在フレームtにおいて検出されたそのブロックの現在ベクトルCVが、初期候補ベクトルとして2番目に用いられることを表す。他のシンボルについても同様に、その英字が動きベクトルの種類を表し、数字が優先順位を表す。   “S / 1” of the block of interest Bt represents that the shifted initial vector SV assigned to the block of interest Bt is used first as an initial candidate vector. Further, “C / 2” of the block adjacent to the left of the block of interest Bt indicates that the current vector CV of the block detected in the current frame t is used second as the initial candidate vector. Similarly, for other symbols, the alphabetic characters indicate the types of motion vectors, and the numbers indicate priority.

このように、信号処理装置1においては、候補ブロックの数、候補ブロックの位置、初期候補ベクトルの種類、および優先順位があらかじめ設定されており、その設定に基づいて初期候補ベクトルが取得され、初期候補ベクトルの情報が各部に出力される。   As described above, in the signal processing device 1, the number of candidate blocks, the position of the candidate block, the type of the initial candidate vector, and the priority order are set in advance, and the initial candidate vector is acquired based on the setting, and the initial Information on candidate vectors is output to each section.

図7の説明に戻り、検出ベクトル取得部52は、候補ベクトル位置演算部51から供給されてきた候補ブロックの位置情報と初期候補ベクトルの種類情報に応じた動きベクトルを検出ベクトルメモリ13より取得し、取得した動きベクトルを、初期候補ベクトルとしてオフセット位置演算部54に出力する。   Returning to the description of FIG. 7, the detection vector acquisition unit 52 acquires, from the detection vector memory 13, the motion vector corresponding to the position information of the candidate block and the type information of the initial candidate vector supplied from the candidate vector position calculation unit 51. The obtained motion vector is output to the offset position calculation unit 54 as an initial candidate vector.

シフト初期ベクトル取得部53は、候補ベクトル位置演算部51から供給されてきた候補ブロックの位置情報と初期候補ベクトルの種類情報に応じて、候補ブロックの位置に対応したシフト初期ベクトルをシフト初期ベクトルメモリ37から取得し、取得したシフト初期ベクトルを初期候補ベクトルとしてオフセット位置演算部54に出力する。   The shifted initial vector acquisition unit 53 receives the shifted initial vector corresponding to the position of the candidate block according to the position information of the candidate block and the type information of the initial candidate vector supplied from the candidate vector position calculating unit 51. 37 and outputs the acquired shifted initial vector to the offset position calculation unit 54 as an initial candidate vector.

また、シフト初期ベクトル取得部53は、候補ベクトル位置演算部51により指示されたブロックにシフト初期ベクトルが割り付けられていない場合、0ベクトルをオフセット位置演算部54に出力する。   In addition, the shifted initial vector acquisition unit 53 outputs a zero vector to the offset position calculating unit 54 when the shifted initial vector is not allocated to the block instructed by the candidate vector position calculating unit 51.

オフセット位置演算部54は、検出ベクトル取得部52またはシフト初期ベクトル取得部53から初期候補ベクトル(あるいは候補ベクトル位置演算部51からの0ベクトル)が供給されてきたとき、候補ベクトル位置演算部51から供給されてきた候補ブロックの位置情報に基づいて、それぞれの初期候補ベクトルに対して、フレームtの着目ブロックをフレームt+1にオフセット(動き補償)させたオフセット先のブロック位置を求める。   When the initial candidate vector (or 0 vector from the candidate vector position calculation unit 51) is supplied from the detection vector acquisition unit 52 or the shifted initial vector acquisition unit 53, the offset position calculation unit 54 receives from the candidate vector position calculation unit 51. Based on the supplied position information of the candidate block, an offset destination block position obtained by offsetting (motion compensation) the target block of the frame t to the frame t + 1 is obtained for each initial candidate vector.

また、オフセット位置演算部54は、初期候補ベクトルとともに、候補ブロックの位置とオフセット先のブロック位置の情報を評価値演算部55に出力する。   Further, the offset position calculation unit 54 outputs information on the position of the candidate block and the block position of the offset destination to the evaluation value calculation unit 55 together with the initial candidate vector.

評価値演算部55は、初期候補ベクトルとともに、候補ブロックの位置とオフセット先のブロック位置の情報がオフセット位置演算部54から供給されてきたとき、供給されてきた初期候補ベクトルの評価値DFDを求め、求めた評価値DFDを、初期候補ベクトルとともに評価値比較部56に出力する。   The evaluation value calculation unit 55 obtains the evaluation value DFD of the supplied initial candidate vector when information on the position of the candidate block and the offset destination block position is supplied from the offset position calculation unit 54 together with the initial candidate vector. The obtained evaluation value DFD is output to the evaluation value comparison unit 56 together with the initial candidate vector.

評価値比較部56は、評価値演算部55から供給されてきた評価値DFDと、最適候補格納用レジスタ57に格納されている最適候補ベクトルの評価値DFDを比較し、評価値演算部55から供給されてきた初期候補ベクトルの評価値DFDが、最適候補ベクトルの評価値DFDよりも小さい、すなわち、初期候補ベクトルの方が最適候補ベクトルよりも信頼度が高いと判定した場合、最適候補格納用レジスタ57に記憶されている最適候補ベクトルとその評価値DFDを、信頼度が高いと判定した初期候補ベクトルとその評価値DFDに置き換える。また、評価値比較部56は、すべての候補ベクトルの中から信頼度が最も高いと判定した最適候補ベクトルを、初期ベクトルV0として、最適候補格納用レジスタ57から反復勾配法演算部33に出力させる。   The evaluation value comparison unit 56 compares the evaluation value DFD supplied from the evaluation value calculation unit 55 with the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 57, and from the evaluation value calculation unit 55 If the evaluation value DFD of the supplied initial candidate vector is smaller than the evaluation value DFD of the optimal candidate vector, that is, if it is determined that the initial candidate vector is more reliable than the optimal candidate vector, The optimal candidate vector and its evaluation value DFD stored in the register 57 are replaced with the initial candidate vector determined to have high reliability and its evaluation value DFD. Further, the evaluation value comparison unit 56 outputs the optimum candidate vector determined to have the highest reliability among all candidate vectors as the initial vector V0 from the optimum candidate storage register 57 to the iterative gradient method computing unit 33. .

次に、図6の反復勾配法演算部33について説明する。   Next, the iterative gradient method computing unit 33 in FIG. 6 will be described.

図10は、反復勾配法演算部33の構成例を示すブロック図である。   FIG. 10 is a block diagram illustrating a configuration example of the iterative gradient method computing unit 33.

モード選択部71は、有効画素判断部73による制御に従って、勾配法演算のモードを例えばブロック毎に選択し、初期ベクトル選択部31から供給されてきた初期ベクトルV0をセレクタ72とベクトル評価部34に出力する。勾配法演算のモードには、動きベクトルの検出対象がブロックであるブロック単位処理モードと、動きベクトルの検出対象が画素である画素単位処理モードがある。例えば、初期値としてブロック単位処理モードが選択される。   The mode selection unit 71 selects a gradient method calculation mode for each block, for example, according to control by the effective pixel determination unit 73, and sends the initial vector V 0 supplied from the initial vector selection unit 31 to the selector 72 and the vector evaluation unit 34. Output. The gradient method calculation mode includes a block unit processing mode in which a motion vector detection target is a block and a pixel unit processing mode in which a motion vector detection target is a pixel. For example, the block unit processing mode is selected as the initial value.

セレクタ72は、ベクトル評価部34による制御に従って、モード選択部71から供給されてきた初期ベクトルV0と、勾配法演算部74から供給されてきた動きベクトルVnのうちのいずれかを、勾配法演算の初期値として用いる動きベクトル(以下、オフセットベクトルという)として有効画素判断部73と勾配法演算部74に出力する。   Under the control of the vector evaluation unit 34, the selector 72 selects one of the initial vector V0 supplied from the mode selection unit 71 and the motion vector Vn supplied from the gradient method calculation unit 74 for gradient method calculation. The motion vector used as an initial value (hereinafter referred to as an offset vector) is output to the effective pixel determination unit 73 and the gradient method calculation unit 74.

有効画素判断部73は、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1のブロックを用いて、セレクタ72から供給されてきたオフセットベクトルをオフセットとして計算した位置の演算ブロックに含まれる勾配法の演算に有効な画素の数がしきい値より多いか否かを判定し、その結果に応じて、勾配方演算のモードをモード選択部71に選択させる。   The effective pixel determination unit 73 uses the blocks of frames t and t + 1 supplied from the pre-filters 32-1 and 32-2 to calculate the position calculated using the offset vector supplied from the selector 72 as an offset. It is determined whether or not the number of pixels effective in the gradient method calculation included in the block is greater than a threshold value, and the mode selection unit 71 is made to select the gradient calculation mode according to the result.

例えば、有効画素判断部73は、処理対象としている演算ブロックに含まれる、勾配法の演算に有効な画素の数がしきい値より多いと判定した場合、勾配法演算部74に勾配法演算処理を実行させる。また、有効画素が少ないと判定した場合、有効画素判断部73は、いま着目しているブロックの処理モードをブロック単位処理モードから画素単位処理モードに変更させたり、勾配法演算部74による処理を中止させたりする。   For example, when the effective pixel determination unit 73 determines that the number of pixels effective for the gradient method calculation included in the calculation block to be processed is larger than the threshold value, the gradient method calculation unit 74 performs the gradient method calculation process. Is executed. If it is determined that there are few effective pixels, the effective pixel determination unit 73 changes the processing mode of the block currently focused on from the block unit processing mode to the pixel unit processing mode, or performs processing by the gradient method calculation unit 74. Or stop it.

勾配法演算部74は、セレクタ72から供給されてきたオフセットベクトルをオフセットとして計算した位置のブロックを処理対象として、選択されている処理モードに応じた勾配法演算を行い、求めた動きベクトルVnをベクトル評価部34と遅延部75に出力する。   The gradient method computing unit 74 performs the gradient method computation according to the selected processing mode on the block at the position calculated using the offset vector supplied from the selector 72 as an offset, and obtains the calculated motion vector Vn. The result is output to the vector evaluation unit 34 and the delay unit 75.

ここで、勾配法演算部74により行われる勾配法演算について説明する。   Here, the gradient method calculation performed by the gradient method calculation unit 74 will be described.

水平軸、垂直軸、時間軸を用いた座標(x,y,t)で表される動画像を構成する画素の輝度値をg(x,y,t)とする。この場合、着目画素(x0,y0,t0)が微小時間中に(dx,dy,dt)だけ変位したとき、水平軸、垂直軸、時間軸の勾配(差分差)をそれぞれgx(x0,y0,t0),gy(x0,y0,t0),gt(x0,y0,t0)と表すと、変位後の画素の輝度値はTaylor展開近似を用いて次式(2)で表される。 Let g (x, y, t) be the luminance value of a pixel constituting a moving image represented by coordinates (x, y, t) using the horizontal axis, vertical axis, and time axis. In this case, when the pixel of interest (x 0 , y 0 , t 0 ) is displaced by (dx, dy, dt) during a minute time, the gradients (difference differences) of the horizontal axis, the vertical axis, and the time axis are gx ( When expressed as x 0 , y 0 , t 0 ), gy (x 0 , y 0 , t 0 ), and gt (x 0 , y 0 , t 0 ), the luminance value of the pixel after displacement uses Taylor expansion approximation. Is represented by the following equation (2).

Figure 0004655215
Figure 0004655215

動画像中のある着目画素が1フレーム後に水平vx,垂直vyだけ移動した場合(以降、(vx,vy)と表す)、その画素の輝度値は次式(3)で表される。   When a pixel of interest in a moving image moves by horizontal vx and vertical vy after one frame (hereinafter referred to as (vx, vy)), the luminance value of that pixel is expressed by the following equation (3).

Figure 0004655215
Figure 0004655215

式(2)を式(3)に代入すると次式(4)が得られる。   Substituting equation (2) into equation (3) yields equation (4) below.

Figure 0004655215
Figure 0004655215

式(4)はvx,vyの2変数の式であるので、1つの着目画素に対する単独の式では、その解を求めることができない。そこで、着目画素の周辺領域であるブロックを1つの処理単位として考え、ブロック(周辺領域)内の全画素が同じ動き(vx,vy)をすると仮定し、各画素について同様の式を立てる。これにより、周辺画素の個数の式が得られ、それらの式を連立させることによって、ブロック内の全ての画素の動き補償フレーム差分の自乗和が最小になるような(vx,vy)を求める。   Since the equation (4) is a two-variable equation of vx and vy, the solution cannot be obtained by a single equation for one pixel of interest. Therefore, a block that is a peripheral region of the pixel of interest is considered as one processing unit, and it is assumed that all the pixels in the block (peripheral region) have the same movement (vx, vy), and a similar expression is established for each pixel. As a result, equations for the number of peripheral pixels are obtained, and by combining these equations, (vx, vy) is obtained such that the sum of squares of the motion compensation frame differences of all the pixels in the block is minimized.

画素(x,y,t)が1フレーム間に(vx,vy)だけ移動したとき、その動き補償フレーム間差分dは次式(5)で表される。   When the pixel (x, y, t) moves by (vx, vy) between one frame, the motion compensation inter-frame difference d is expressed by the following equation (5).

Figure 0004655215
Figure 0004655215

式(5)において、Δx=gx(x,y,t)であり、これは水平方向の勾配を表す。また、Δy=gy(x,y,t)であり、これは垂直方向の勾配を表し、Δt=gt(x,y,t)であり、これは時間方向の勾配を表す。これらを用いて、動き補償フレーム間差分の自乗和Eは式(6)で表される。   In equation (5), Δx = gx (x, y, t), which represents a horizontal gradient. Also, Δy = gy (x, y, t), which represents a vertical gradient, and Δt = gt (x, y, t), which represents a gradient in the time direction. Using these, the square sum E of the difference between the motion compensation frames is expressed by Expression (6).

Figure 0004655215
Figure 0004655215

ここで、自乗和Eが最小となる(vx,vy)は、各変数における偏微分値が0になるとき、すなわち、δE/δvx=δE/δvy=0の条件が成立するときのものなので、式(6)から式(7)、(8)が得られる。   Here, (vx, vy) at which the sum of squares E is minimum is when the partial differential value in each variable becomes 0, that is, when the condition of δE / δvx = δE / δvy = 0 holds. Expressions (7) and (8) are obtained from Expression (6).

Figure 0004655215
Figure 0004655215

Figure 0004655215
Figure 0004655215

これらの式(7)、(8)から、求めたい動きである(vx,vy)は次式(9)により求めることができる。   From these equations (7) and (8), (vx, vy) which is the desired motion can be obtained by the following equation (9).

Figure 0004655215
Figure 0004655215

図11を参照して具体的に説明する。   This will be specifically described with reference to FIG.

図11において、矢印Xは水平方向を示し、矢印Yは垂直方向を示す。また、矢印Tは、図中、右奥のフレームtから、左手前のフレームt+1への時間の経過方向を示す。なお、図11においては、各フレームとして、勾配法演算に用いられる、着目画素pの周辺領域である8×8画素の領域のみが示されている。   In FIG. 11, the arrow X indicates the horizontal direction, and the arrow Y indicates the vertical direction. An arrow T indicates the direction of passage of time from the frame t at the far right in the figure to the frame t + 1 at the left front. In FIG. 11, only an 8 × 8 pixel region that is a peripheral region of the pixel of interest p and is used for the gradient method calculation is shown as each frame.

図11のフレームtにおいて、左上の画素から下に5番目、右に5番目の画素である着目画素pの動きベクトルV(vx,vy)を勾配法により求める場合、動きベクトルV(vx,vy)は、着目画素pのx,y方向のそれぞれについて求められる隣接画素pxおよびpyとの輝度の差分差(すなわち、勾配)ΔxおよびΔy、フレームt+1において求められる着目画素pの同位相に位置する画素qとの時間方向の輝度の差分差Δtを、着目画素pの周辺領域(8×8画素)のすべての画素について求め、それらの差分差を式(9)を用いて演算することにより求めることができる。   In the frame t in FIG. 11, when the motion vector V (vx, vy) of the pixel of interest p, which is the fifth pixel down from the upper left pixel and the fifth pixel on the right, is obtained by the gradient method, the motion vector V (vx, vy ) Is the difference in luminance difference between adjacent pixels px and py obtained in the x and y directions of the pixel of interest p (ie, gradients) Δx and Δy, and the same phase of the pixel of interest p obtained in the frame t + 1. A difference in luminance Δt in the time direction with respect to the pixel q located is obtained for all pixels in the peripheral region (8 × 8 pixels) of the pixel of interest p, and the difference between them is calculated using equation (9). It can ask for.

すなわち、勾配法とは、2フレーム間において、勾配Δx,Δy,およびΔtを求め、求められたΔx,Δy,およびΔtから差分自乗和を用いて、統計的に、動きベクトルV(vx,vy)を算出するものである。   That is, the gradient method is to obtain gradients Δx, Δy, and Δt between two frames, and statistically calculate a motion vector V (vx, vy) using the sum of squares of differences from the obtained Δx, Δy, and Δt. ) Is calculated.

このような勾配法を用いた動きベクトル検出方法においては、微小動きに対して精度の高い結果が得られるが、実際の動画像の中で動きを求める場合、この勾配法の演算は動き量が大きすぎるため実用的とはいえず、大きな動き量に対応するため、勾配法の演算を反復することが考えられる。これにより、各演算で求められる動き量が収束し、徐々に、正しい動きを求めることができる。   In such a motion vector detection method using the gradient method, a high-accuracy result can be obtained for a minute motion. However, when calculating a motion in an actual moving image, the calculation of the gradient method requires a motion amount. It is not practical because it is too large, and it is conceivable to repeat the calculation of the gradient method in order to cope with a large amount of motion. As a result, the amount of motion obtained by each calculation converges, and a correct motion can be obtained gradually.

しかしながら、勾配法をただ反復するだけでは演算時間の面から実用的ではない。そこで、ベクトル検出部12においては、過去フレームと現在フレームの周辺画素の動きに基づいて求められる初期ベクトルを初期値として用いることで、勾配法の繰り返し回数を軽減している。すなわち、動きの起点となる着目画素から、初期ベクトルが指す先へオフセットを予め加えることで大まかな動きを算出し、オフセットが加えられたその位置から勾配法を用いた演算を行うようにすれば、演算時間を増大させることなく、精度のよい動きベクトルを検出することができる。   However, simply repeating the gradient method is not practical in terms of computation time. Therefore, the vector detection unit 12 reduces the number of times the gradient method is repeated by using, as an initial value, an initial vector that is obtained based on the motion of surrounding pixels of the past frame and the current frame. In other words, if a rough motion is calculated by adding an offset in advance from the pixel of interest that is the starting point of the motion to the destination indicated by the initial vector, an operation using the gradient method is performed from the position where the offset is added. It is possible to detect an accurate motion vector without increasing the calculation time.

図12は、初期ベクトルを用いて行われる反復勾配法について示す図である。   FIG. 12 is a diagram illustrating the iterative gradient method performed using the initial vector.

図12においては、矢印Tは、図中、左手前のフレームtから、右奥のフレームt+1への時間の経過を示している。なお、画素p,q0,q1,q2,q3を中心としたブロックは、それぞれの画素の勾配法演算に用いられる周辺領域(ブロック)を表す。   In FIG. 12, the arrow T indicates the passage of time from the left front frame t to the right back frame t + 1 in the figure. A block centered on the pixels p, q0, q1, q2, and q3 represents a peripheral region (block) used for the gradient method calculation of each pixel.

図12の例の場合、フレームtにおける着目画素pに対して、フレームt+1においては、着目画素pの同位相に位置する画素q0ではなく、初期ベクトルv0をオフセットとして計算した位置(画素)q1を開始点として1回目の勾配法演算が行われ、その結果、動きベクトルv1が得られる。   In the case of the example in FIG. 12, the position (pixel) calculated using the initial vector v0 as an offset in the frame t + 1, not the pixel q0 located in the same phase of the pixel of interest p, as compared to the pixel of interest p in the frame t. The first gradient method calculation is performed with q1 as a starting point, and as a result, a motion vector v1 is obtained.

次に、画素q0からv0+v1をオフセットとして計算した位置(画素)q2を開始点として2回目の勾配法演算が行われ、その結果、動きベクトルv2が得られる。これにより、動きベクトルVは最終的に下式(10)として求められる。   Next, the gradient method calculation is performed a second time with the position (pixel) q2 calculated from the pixels q0 to v0 + v1 as an offset, and as a result, a motion vector v2 is obtained. Thereby, the motion vector V is finally obtained as the following equation (10).

Figure 0004655215
Figure 0004655215

以上のように、初期ベクトルを用いて勾配法の演算を行うことにより、演算時間を短縮させつつ、精度の高い動きベクトルを求めることが可能となる。   As described above, by performing the gradient method calculation using the initial vector, it is possible to obtain a highly accurate motion vector while reducing the calculation time.

図10の説明に戻り、遅延部75は、勾配法演算部74から供給されてきた動きベクトルVnを有効画素判断部73と勾配法演算部74の次の処理のサイクルまで保持し、セレクタ72の制御に応じて、保持する動きベクトルVnを有効画素判断部73に出力する。   Returning to the description of FIG. 10, the delay unit 75 holds the motion vector Vn supplied from the gradient method calculation unit 74 until the next processing cycle of the effective pixel determination unit 73 and the gradient method calculation unit 74. In accordance with the control, the held motion vector Vn is output to the effective pixel determination unit 73.

ここで、図10の有効画素判断部73と勾配法演算部74の詳細について順に説明する。   Here, the details of the effective pixel determination unit 73 and the gradient method calculation unit 74 in FIG. 10 will be described in order.

図13は、有効画素判断部73の構成例を示すブロック図である。   FIG. 13 is a block diagram illustrating a configuration example of the effective pixel determination unit 73.

時間画素差分算出部81は、ブロック単位の演算ブロックにおいて画素を選択し、セレクタ72から供給されてきたオフセットベクトルと、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、選択した画素の時間方向の画素差分Δtを算出し、算出された時間方向の画素差分Δtを画素差分値判断部82に出力する。画素差分Δtは、例えば、フレームtとフレームt+1間の対応する画素の輝度値の差として表される。   The time pixel difference calculation unit 81 selects a pixel in a calculation unit in units of blocks, the offset vector supplied from the selector 72, and the frames t and t + 1 supplied from the prefilters 32-1 and 32-2. Is used to calculate the pixel difference Δt in the time direction of the selected pixel, and the calculated pixel difference Δt in the time direction is output to the pixel difference value determination unit 82. The pixel difference Δt is expressed as, for example, a difference in luminance value of corresponding pixels between the frame t and the frame t + 1.

画素差分値判断部82は、時間画素差分算出部81により算出された時間方向の画素差分Δtが所定のしきい値(以下、画素差分値という)よりも小さいか否かを判定し、画素差分値より小さいと判定した場合、有効画素数カウンタ83においてカウントされる有効画素の数を1つインクリメントさせる。   The pixel difference value determination unit 82 determines whether or not the pixel difference Δt in the time direction calculated by the time pixel difference calculation unit 81 is smaller than a predetermined threshold (hereinafter referred to as a pixel difference value). When it is determined that the value is smaller than the value, the number of effective pixels counted by the effective pixel counter 83 is incremented by one.

有効画素数カウンタ83は、画素差分値判断部82により有効であると判定された画素の数を演算ブロック毎にカウントする。   The effective pixel number counter 83 counts the number of pixels determined to be effective by the pixel difference value determination unit 82 for each calculation block.

勾配法継続判断部84は、演算ブロックに含まれる勾配法の演算に有効な画素の数がしきい値より多いか否かを判定し、しきい値より多いと判定した場合、勾配法演算を実行することを表すフラグ(flg=1)を勾配法演算部74に出力する。   The gradient method continuation determination unit 84 determines whether or not the number of pixels effective for gradient method calculation included in the calculation block is greater than a threshold value. If it is determined that the number is greater than the threshold value, the gradient method calculation is performed. A flag (flg = 1) indicating execution is output to the gradient method computing unit 74.

また、勾配法継続判断部84は、演算ブロックに含まれる勾配法の演算に有効な画素の数がしきい値より少ないと判定した場合、モード選択部71に他の処理モードを選択させたり、勾配法演算を打ち切ることを表すフラグ(flg=0)を勾配法演算部74に出力する。   In addition, when the gradient method continuation determination unit 84 determines that the number of pixels effective for the calculation of the gradient method included in the calculation block is less than the threshold value, the gradient selection continuation determination unit 84 causes the mode selection unit 71 to select another processing mode, A flag (flg = 0) indicating that the gradient method calculation is terminated is output to the gradient method calculation unit 74.

ここで、勾配法の演算に有効な画素について説明する。   Here, pixels effective for the calculation of the gradient method will be described.

1つのブロックに含まれる画素が同じオブジェクトを表示するものである場合、それぞれの画素の動きはだいたい同じ動きをしていることが多いと考えられることから、動きベクトルの検出は、例えば、図14に示されるようなブロック単位で行われる。   When pixels included in one block display the same object, it is considered that the motion of each pixel is almost the same, and therefore, detection of a motion vector is performed by, for example, FIG. Is performed in units of blocks as shown in FIG.

図14において、矢印Xは水平方向を示し、矢印Yは垂直方向を示す。また、矢印Tは、図中、右奥のフレームtから、左手前のフレームt+1への時間の経過方向を示す。   In FIG. 14, the arrow X indicates the horizontal direction, and the arrow Y indicates the vertical direction. An arrow T indicates the direction of passage of time from the frame t at the far right in the figure to the frame t + 1 at the left front.

図14の例においては、各フレームの検出対象ブロックK(演算ブロック)として、8×8画素のブロックが示されている。この検出対象ブロックKを用いた勾配法演算により求められる動きベクトルは、検出対象ブロックKを構成するすべての画素に対応する動きベクトルとされる。   In the example of FIG. 14, an 8 × 8 pixel block is shown as the detection target block K (calculation block) of each frame. The motion vector obtained by the gradient method calculation using the detection target block K is a motion vector corresponding to all the pixels constituting the detection target block K.

ところで、勾配法の演算に用いられる画素を演算ブロック単位に扱う処理においては、図15に示されるように、検出対象ブロックの中に異なる動きを持つオブジェクトの画素が混在する場合に問題となる。   By the way, in the process of handling the pixels used for the calculation of the gradient method in units of calculation blocks, as shown in FIG. 15, there is a problem when pixels of objects having different motions are mixed in the detection target block.

図15の検出対象ブロックKにおいては、左上方の画素(太線丸)は矢印Aに示されるような斜め左上への動きを有しており、右下方の画素(細線丸)は矢印Bに示されるような右横への動きを有している。   In the detection target block K in FIG. 15, the upper left pixel (thick line circle) has a diagonally upper left movement as indicated by the arrow A, and the lower right pixel (thin line circle) is indicated by the arrow B. It has a right-to-right movement.

したがって、図15の検出対象ブロックKにおいては、1つのブロック内の画素が同じ動きをとるという仮定が崩れてしまい、動きの異なる画素を含んだままの演算ブロックを用いて勾配法の演算を行った場合、動きベクトルの検出精度が著しく低下してしまう。すなわち、これは、異なる動きを持つオブジェクト同士の境界に発生する、オブジェクトの消滅領域(カバードバックグラウンド領域)および発生領域(アンカバードバックグラウンド領域)に関する検出精度低下問題である。   Therefore, in the detection target block K in FIG. 15, the assumption that the pixels in one block move in the same manner is broken, and the gradient method is calculated using an operation block that includes pixels with different motions. In such a case, the motion vector detection accuracy is significantly reduced. That is, this is a problem of a decrease in detection accuracy regarding the disappearance region (covered background region) and the generation region (uncovered background region) of the object that occurs at the boundary between objects having different movements.

消滅領域は、前景領域に対して、前景のオブジェクトの進行方向の前端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が前景に覆い隠される領域をいう。また、発生領域は、前景領域に対して、前景のオブジェクトの進行方向の後端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が現れる領域をいう。   The disappearance region is a mixed region at a position corresponding to the front end portion of the foreground object in the traveling direction with respect to the foreground region, and is a region where the background component is covered with the foreground as time passes. The generation area is a mixed area at a position corresponding to the rear end of the foreground object in the advancing direction with respect to the foreground area, and refers to an area where a background component appears as time passes.

このように、例えば、オブジェクトの消滅、発生、または変形などにより、異なる動きを有するオブジェクトの画素が1つの検出ブロック内に混在する場合、フレームtとフレームt+1の対応する画素間で輝度値が大きく変化することが多いことなどから動きの乱れが生じてしまう。そこで、輝度変化が小さい画素だけが有効な画素とされることにより、動きベクトル検出の精度を高めることができる。   As described above, for example, when pixels of an object having different movements are mixed in one detection block due to disappearance, generation, or deformation of the object, the luminance value between corresponding pixels of the frame t and the frame t + 1. Disturbance of movement occurs due to the fact that there are many changes in Therefore, the accuracy of motion vector detection can be improved by considering only pixels with small luminance changes as effective pixels.

また、勾配法演算は統計的な解法である最小自乗法に基づいた演算であるから、少ない数の画素(有効な画素)を対象として演算を行った場合、演算結果の信頼度が低下し、検出される動きベクトルの精度が悪くなるおそれがある。   In addition, since the gradient method operation is an operation based on the least square method which is a statistical solution, if the operation is performed on a small number of pixels (effective pixels), the reliability of the operation result decreases, There is a possibility that the accuracy of the detected motion vector is deteriorated.

そこで、有効画素判断部73においては、勾配法演算に有効な画素の数が少ない場合、ブロック単位での演算は不安定であるとし、画素単位で演算を行う処理モードに切り替えられる。   Therefore, in the effective pixel determination unit 73, when the number of effective pixels for the gradient method calculation is small, the calculation in units of blocks is assumed to be unstable, and the processing mode is switched to the processing mode in which the calculation is performed in units of pixels.

図16は、画素単位での処理モードにおける演算ブロックの例を示す図である。   FIG. 16 is a diagram illustrating an example of a calculation block in the processing mode in units of pixels.

図16に示されるように、画素pに着目しており、その動きベクトルを求める場合に処理モードがブロック単位のモードから画素単位のモードに切り替えられたとき、点線で囲んで示される検出対象ブロックKではなく、演算ブロックとして、例えば、画素pを中心とした9×9画素の演算ブロックEが用いられる。   As shown in FIG. 16, when the pixel p is focused and the processing mode is switched from the block unit mode to the pixel unit mode when obtaining the motion vector, the detection target block surrounded by a dotted line is shown. For example, a 9 × 9 pixel calculation block E centered on the pixel p is used as the calculation block instead of K.

さらに、勾配法演算に有効な画素の数が極端に少なく、画素単位の処理によってもある程度信頼のできる動きベクトルを検出することができない場合には、動きベクトルの演算は打ち切られ、検出結果の動きベクトルとして、例えば、0ベクトル(静止状態)が出力されるように勾配法演算部74が制御される。   Furthermore, if the number of pixels that are effective for gradient method calculation is extremely small and it is not possible to detect a motion vector that is reliable to some extent even by pixel-by-pixel processing, the motion vector calculation is aborted, and the motion of the detection result For example, the gradient method computing unit 74 is controlled so that a 0 vector (stationary state) is output as a vector.

図17は、図10の勾配法演算部74の構成例を示すブロック図である。   FIG. 17 is a block diagram illustrating a configuration example of the gradient method computing unit 74 of FIG.

時間画素差分算出部91は、有効画素判断部73から供給されてきたフラグが1を示す場合、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、セレクタ72からのオフセットベクトルをオフセットとして計算した画素を中心とした演算ブロック内の画素を選択し、選択した画素の時間方向の画素差分Δtを算出する。時間画素差分算出部91は、算出した画素差分Δtをオフセットベクトルとともに画素差分値判断部92に出力する。   When the flag supplied from the effective pixel determination unit 73 indicates 1, the time pixel difference calculation unit 91 uses the frames t and t + 1 supplied from the pre-filters 32-1 and 32-2 to select the time pixel difference calculation unit 91. The pixel in the calculation block centering on the pixel calculated using the offset vector from 72 as an offset is selected, and the pixel difference Δt in the time direction of the selected pixel is calculated. The temporal pixel difference calculation unit 91 outputs the calculated pixel difference Δt to the pixel difference value determination unit 92 together with the offset vector.

また、時間画素差分算出部91は、演算ブロック内の画素の処理が終了した場合、オフセットベクトルをベクトル算出部95に出力する。   Further, the temporal pixel difference calculation unit 91 outputs an offset vector to the vector calculation unit 95 when the processing of the pixels in the calculation block is completed.

一方、フラグが0を示す場合、時間画素差分算出部91は勾配法演算の処理を打ち切る。このとき、時間画素差分算出部91は、ベクトル算出部95から出力される動きベクトルVを0ベクトルに設定させる。   On the other hand, when the flag indicates 0, the time pixel difference calculation unit 91 aborts the gradient method calculation process. At this time, the temporal pixel difference calculation unit 91 sets the motion vector V output from the vector calculation unit 95 to the 0 vector.

画素差分値判断部92は、時間画素差分算出部91により算出された時間方向の画素差分Δtが所定のしきい値(以下、画素差分値という)よりも小さいか否かを判定し、画素差分値より小さいと判定した場合、その画素を勾配法の演算対象とし、画素差分Δtとオフセットベクトルを水平垂直画素差分算出部93に出力する。   The pixel difference value determination unit 92 determines whether or not the pixel difference Δt in the time direction calculated by the time pixel difference calculation unit 91 is smaller than a predetermined threshold (hereinafter referred to as a pixel difference value). If it is determined that the pixel value is smaller than the value, the pixel is set as a calculation target of the gradient method, and the pixel difference Δt and the offset vector are output to the horizontal / vertical pixel difference calculation unit 93.

また、画素差分値判断部92は、画素差分Δtが画素差分値以上であると判定した場合、水平垂直画素差分算出部93および勾配積算部94に、その画素の処理を禁止させる。   If the pixel difference value determination unit 92 determines that the pixel difference Δt is equal to or greater than the pixel difference value, the pixel difference value determination unit 92 prohibits the horizontal / vertical pixel difference calculation unit 93 and the gradient integration unit 94 from processing the pixel.

水平垂直画素差分算出部93は、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、画素差分値判断部92から供給されてきたオフセットベクトルをオフセットとして計算した画素を中心とした演算ブロック内において、画素差分値判断部92により演算対象とされた画素の水平方向の画素差分Δxと垂直方向の画素差分Δyを算出する。水平垂直画素差分算出部93は、算出した画素差分Δx,Δyを、画素差分Δtとともに勾配積算部94に出力する。   The horizontal / vertical pixel difference calculation unit 93 calculates the offset vector supplied from the pixel difference value determination unit 92 as an offset using the frames t and t + 1 supplied from the pre-filters 32-1 and 32-2. In the calculation block centered on the pixel, the pixel difference value determination unit 92 calculates the pixel difference Δx in the horizontal direction and the pixel difference Δy in the vertical direction of the pixel to be calculated. The horizontal / vertical pixel difference calculation unit 93 outputs the calculated pixel differences Δx and Δy to the gradient integration unit 94 together with the pixel difference Δt.

勾配積算部94は、水平垂直画素差分算出部93から供給されてきた勾配(画素差分Δx,Δy,Δt)を積算し、積算した勾配の値をベクトル算出部95に出力する。   The gradient integrating unit 94 integrates the gradients (pixel differences Δx, Δy, Δt) supplied from the horizontal / vertical pixel difference calculating unit 93 and outputs the integrated gradient values to the vector calculating unit 95.

ベクトル算出部95は、時間画素差分算出部91からオフセットベクトルが供給されてきたとき、勾配積算部94により積算された勾配の値と、上式(9)の最小自乗和から動きベクトルvnを算出する。   When the offset vector is supplied from the time pixel difference calculation unit 91, the vector calculation unit 95 calculates the motion vector vn from the gradient value accumulated by the gradient accumulation unit 94 and the least square sum of the above equation (9). To do.

また、ベクトル算出部95は、算出した動きベクトルvnに時間画素差分算出部91からのオフセットベクトルを加算して動きベクトルVnを求め、求めた動きベクトルVnをベクトル評価部34と遅延部75に出力する。   Further, the vector calculation unit 95 adds the offset vector from the time pixel difference calculation unit 91 to the calculated motion vector vn to obtain the motion vector Vn, and outputs the obtained motion vector Vn to the vector evaluation unit 34 and the delay unit 75. To do.

次に、図6のシフト初期ベクトル割付部35について説明する。   Next, the shifted initial vector allocation unit 35 in FIG. 6 will be described.

図18は、シフト初期ベクトル割付部35の構成例を示すブロック図である。   FIG. 18 is a block diagram illustrating a configuration example of the shifted initial vector allocation unit 35.

割付対象位置演算部101は、ベクトル評価部34から供給されてきた動きベクトルVが、次の時刻のフレーム上において通過するブロックの位置(現在のフレーム上において検出された動きベクトルVの終点のブロックと同じ位置にある次のフレーム上のブロックの位置)を求め、求めたブロックの位置を評価値メモリ36とシフト初期ベクトル置換部103に出力する。   The allocation target position calculation unit 101 is the position of the block through which the motion vector V supplied from the vector evaluation unit 34 passes on the frame at the next time (the block at the end point of the motion vector V detected on the current frame). And the position of the obtained block is output to the evaluation value memory 36 and the shifted initial vector replacement unit 103.

評価値比較部102は、動きベクトルVと、動きベクトルVの評価値DFDがベクトル評価部34から供給されてきたとき、割付対象位置演算部101により求められたブロックの位置の評価値DFDを評価値メモリ36から読み出し、読み出した評価値DFDと、ベクトル評価部34から供給されてきた動きベクトルVの評価値DFDとを比較する。評価値比較部102は、ベクトル評価部34から供給されてきた動きベクトルVの評価値DFDの方が小さい(信頼度が高い)と判定した場合、シフト初期ベクトル置換部103を制御し、シフト初期ベクトルメモリ37に記憶されているシフト初期ベクトルを、信頼度が高いと判定した動きベクトルVで書き換えさせる。   When the motion vector V and the evaluation value DFD of the motion vector V are supplied from the vector evaluation unit 34, the evaluation value comparison unit 102 evaluates the evaluation value DFD of the block position obtained by the allocation target position calculation unit 101. The evaluation value DFD read out from the value memory 36 is compared with the evaluation value DFD of the motion vector V supplied from the vector evaluation unit 34. When the evaluation value comparison unit 102 determines that the evaluation value DFD of the motion vector V supplied from the vector evaluation unit 34 is smaller (higher reliability), the evaluation value comparison unit 102 controls the shifted initial vector replacement unit 103 to perform the initial shifting. The shifted initial vector stored in the vector memory 37 is rewritten with the motion vector V determined to have high reliability.

また、評価値比較部102は、評価値置換部104を制御し、評価値メモリ36に記憶されている、割付対象位置演算部101により選択されたブロックの位置の評価値DFDを動きベクトルVの評価値DFDで書き換えさせる。   Further, the evaluation value comparison unit 102 controls the evaluation value replacement unit 104, and uses the evaluation value DFD of the position of the block selected by the allocation target position calculation unit 101 stored in the evaluation value memory 36 as the motion vector V. Rewrite with the evaluation value DFD.

シフト初期ベクトル置換部103は、シフト初期ベクトルメモリ37に記憶されているシフト初期ベクトルを評価値比較部102による制御に従って書き換える。   The shifted initial vector replacement unit 103 rewrites the shifted initial vector stored in the shifted initial vector memory 37 according to the control by the evaluation value comparing unit 102.

評価値置換部104は、評価値メモリ36に記憶されている評価値DFDを評価値比較部102による制御に従って書き換える。   The evaluation value replacement unit 104 rewrites the evaluation value DFD stored in the evaluation value memory 36 according to the control by the evaluation value comparison unit 102.

図19は、シフト初期ベクトルを1次元的に示す図である。   FIG. 19 is a diagram showing the shifted initial vector one-dimensionally.

図19の例においては、上から順に、フレームt-1,t,t+1が示されている。それぞれのフレーム上の仕切りはブロックの境界を表す。   In the example of FIG. 19, frames t-1, t, t + 1 are shown in order from the top. Partitions on each frame represent block boundaries.

図19の例の場合、フレームt-1上のブロックBにおいて検出される動きベクトルが実線矢印で示される動きベクトルVとされ、この動きベクトルVによるフレームt上の動き補償先(オフセット先)がブロックBtとされている。また、フレームt-1上の動きベクトルVをフレームt上のブロックBtにシフトした動きベクトルが点線矢印で示されるシフト初期ベクトルSVとされている。   In the case of the example in FIG. 19, the motion vector detected in the block B on the frame t−1 is the motion vector V indicated by the solid line arrow, and the motion compensation destination (offset destination) on the frame t by this motion vector V is Block Bt. In addition, a motion vector obtained by shifting the motion vector V on the frame t-1 to the block Bt on the frame t is set as a shifted initial vector SV indicated by a dotted arrow.

なお、シフトとは、フレームt-1上において検出された動きベクトルVと同じ大きさで同じ向きの動きベクトルの始点を、フレームt-1上の動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロックBtとすることをいう。   The shift means that the start point of the motion vector having the same magnitude and the same direction as the motion vector V detected on the frame t-1 is at the same position as the end block of the motion vector V on the frame t-1. The block Bt on the frame t.

一般的に、連続するフレーム間では、動物体の動き量にある程度の連続性があり、その動き量の変化が小さいので、図19の例においては、ブロックB上の物体が等速か、それに近い動きをする場合、ブロックBtにおける動きベクトルも、動きベクトルVか、それに近い動きのベクトルになることが多い。   In general, there is a certain degree of continuity in the amount of movement of moving objects between consecutive frames, and the change in the amount of movement is small. Therefore, in the example of FIG. In the case of close motion, the motion vector in the block Bt is often the motion vector V or a motion vector close thereto.

したがって、シフト初期ベクトルSVがフレームt上の着目ブロックBtの動きベクトルを検出する場合に勾配法演算に与える初期ベクトルの候補として用いられることにより、周辺ブロックの動きベクトルだけを初期ベクトルの候補として用いる場合よりもより適切な初期ベクトルを得ることができる。   Therefore, when the shifted initial vector SV is used as a candidate for an initial vector given to the gradient method calculation when detecting a motion vector of the block of interest Bt on the frame t, only the motion vector of the peripheral block is used as a candidate for the initial vector. A more appropriate initial vector can be obtained than in the case.

ところで、このようにして初期ベクトルをそれぞれのブロックに割り付ける場合、フレームt-1上で検出される動きベクトルの分布によっては、フレームt上において、複数のシフト初期ベクトルが割り付けの対象のベクトルとして競合するブロックや、逆に、割り付けが起こらないブロックが発生する。   By the way, when an initial vector is allocated to each block in this way, depending on the distribution of motion vectors detected on the frame t-1, a plurality of shifted initial vectors compete as allocation target vectors on the frame t. Blocks that do not, and conversely, blocks that are not allocated.

図20は、シフト初期ベクトルの割り付けの例を示す図である。   FIG. 20 is a diagram illustrating an example of allocation of the shifted initial vector.

図20においては、フレームt-1上には、左からブロックB1乃至B5が示されており、フレームt上には、左から、ブロックB1乃至B5に対応する領域としてのブロックBt1乃至Bt5が示されている。   In FIG. 20, blocks B1 to B5 are shown from the left on the frame t-1, and blocks Bt1 to Bt5 as areas corresponding to the blocks B1 to B5 are shown from the left on the frame t. Has been.

また、図20のブロックB1においては動きベクトルV1が検出され、ブロックB1のオフセット先A1は、フレームt上のブロックBt1,Bt2と重なりを持つ。また、ブロックB2においては動きベクトルV2が検出され、ブロックB2のオフセット先A2は、フレームt上のブロックBt1,Bt2と重なりを持つ。   In addition, the motion vector V1 is detected in the block B1 of FIG. 20, and the offset destination A1 of the block B1 overlaps with the blocks Bt1 and Bt2 on the frame t. In addition, the motion vector V2 is detected in the block B2, and the offset destination A2 of the block B2 overlaps the blocks Bt1 and Bt2 on the frame t.

同様に、ブロックB3おいては、動きベクトルV3が検出され、ブロックB3のオフセット先A3は、フレームt上のブロックBt4,Bt5と重なりを持つ。ブロックB4においては、動きベクトルV4が検出され、ブロックB4のオフセット先A4は、フレームt上のブロックBt4,Bt5と重なりを持つ。ブロックB5においては、動きベクトルV5が検出され、ブロックB5のオフセット先A5は、フレームt上のブロックBt5、および、図示せぬ隣接ブロックと重なりを持つ。   Similarly, in the block B3, the motion vector V3 is detected, and the offset destination A3 of the block B3 overlaps with the blocks Bt4 and Bt5 on the frame t. In block B4, motion vector V4 is detected, and offset destination A4 of block B4 overlaps with blocks Bt4 and Bt5 on frame t. In the block B5, the motion vector V5 is detected, and the offset destination A5 of the block B5 overlaps with the block Bt5 on the frame t and an adjacent block (not shown).

すなわち、図20の例においては、フレームt上のブロックBt1,Bt2には、動きベクトルV1とV2のどちらか一方がシフト初期ベクトルとして割り付けられる。また、フレームt上のブロックBt4には、動きベクトルV3とV4のどちらか一方がシフト初期ベクトルとして割り付けられ、フレームt上のブロックBt5には、動きベクトルV3,V4、およびV5のうちのいずれかがシフト初期ベクトルとして割り付けられる。   That is, in the example of FIG. 20, one of the motion vectors V1 and V2 is assigned to the blocks Bt1 and Bt2 on the frame t as a shifted initial vector. In addition, one of the motion vectors V3 and V4 is assigned to the block Bt4 on the frame t as a shift initial vector, and any one of the motion vectors V3, V4, and V5 is assigned to the block Bt5 on the frame t. Are assigned as shifted initial vectors.

しかしながら、フレームt上のブロックBt3には、シフト初期ベクトルの候補となる動きベクトルが存在せず、シフト初期ベクトルは割り付けられない。   However, in the block Bt3 on the frame t, there is no motion vector that is a candidate for the shifted initial vector, and the shifted initial vector is not allocated.

そこで、シフト初期ベクトル割付部35は、ブロックBt3のように、シフト初期ベクトルの割り付けが起こらないブロックに対して、0ベクトルをシフト初期ベクトルとして割り付ける。   Therefore, the shifted initial vector allocating unit 35 allocates the 0 vector as the shifted initial vector to a block in which allocation of the shifted initial vector does not occur, such as the block Bt3.

一方、シフト初期ベクトル割付部35は、ブロックBt1,Bt2,Bt4,およびBt5のように、複数の動きクトルが競合するブロックについては、上述した評価値DFDに基づいて信頼度が高い動きベクトルを選択し、選択した動きベクトルをシフト初期ベクトルとしてそれぞれのブロックに割り付ける。   On the other hand, the shifted initial vector allocating unit 35 selects a motion vector with high reliability based on the above-described evaluation value DFD for blocks such as blocks Bt1, Bt2, Bt4, and Bt5 that compete with a plurality of motion vectors. Then, the selected motion vector is allocated to each block as a shifted initial vector.

次に、以上のような構成を有するベクトル検出部12の各部の処理について説明する。   Next, processing of each unit of the vector detection unit 12 having the above configuration will be described.

はじめに、図21のフローチャートを参照して、ベクトル検出部12により行われる動きベクトル検出処理の全体について説明する。この処理は、図5のステップS2において行われる処理である。   First, the entire motion vector detection process performed by the vector detection unit 12 will be described with reference to the flowchart of FIG. This process is a process performed in step S2 of FIG.

ステップS21において、初期ベクトル選択部31は、フレームt上のブロックの中から処理の対象となるブロックを着目ブロックとして選択する。例えば、左上のブロックからラスタ順に着目ブロックが選択される。   In step S21, the initial vector selection unit 31 selects a block to be processed from among the blocks on the frame t as a target block. For example, the target block is selected in raster order from the upper left block.

ステップS22において、初期ベクトル選択部31は初期ベクトル選択処理を実行する。初期ベクトル選択処理により選択された初期ベクトルは反復勾配法演算部33に出力される。初期ベクトル選択処理の詳細については、図22のフローチャートを参照して後述する。   In step S22, the initial vector selection unit 31 executes initial vector selection processing. The initial vector selected by the initial vector selection process is output to the iterative gradient method computing unit 33. Details of the initial vector selection processing will be described later with reference to the flowchart of FIG.

ステップS23において、反復勾配法演算部33とベクトル評価部34は反復勾配法演算評価処理を実行する。すなわち、ここでは、反復勾配法演算部33により動きベクトルが求められ、その求められた動きベクトルが、ベクトル評価部34により評価される。得られた動きベクトルVは、検出ベクトルメモリ13に出力され、記憶される。反復勾配法演算評価処理の詳細については、図23のフローチャートを参照して後述する。   In step S23, the iterative gradient method computing unit 33 and the vector evaluating unit 34 execute an iterative gradient method computing and evaluating process. That is, here, a motion vector is obtained by the iterative gradient method computing unit 33, and the obtained motion vector is evaluated by the vector evaluation unit 34. The obtained motion vector V is output to and stored in the detection vector memory 13. Details of the iterative gradient method computation evaluation process will be described later with reference to the flowchart of FIG.

ステップS24において、シフト初期ベクトル割付部35はシフト初期ベクトル割付処理を実行する。シフト初期ベクトル割付処理により設定されたシフト初期ベクトルは、着目ブロックに対応させた形でシフト初期ベクトルメモリ37に割り付けられる。シフト初期ベクトル割付処理の詳細については、図27のフローチャートを参照して後述する。   In step S24, the shifted initial vector allocation unit 35 performs a shifted initial vector allocation process. The shifted initial vector set by the shifted initial vector allocation process is allocated to the shifted initial vector memory 37 in a form corresponding to the block of interest. Details of the shifted initial vector allocation processing will be described later with reference to the flowchart of FIG.

ステップS25において、初期ベクトル選択部31は、フレームtのすべてのブロックの処理が終了したか否かを判定し、すべてのブロックの処理が終了していないと判定した場合、ステップS21に戻り、それ以降の処理を繰り返す。   In step S25, the initial vector selection unit 31 determines whether or not the processing of all the blocks in the frame t has been completed. If it is determined that the processing of all the blocks has not been completed, the initial vector selection unit 31 returns to step S21. The subsequent processing is repeated.

初期ベクトル選択部31は、ステップS25において、すべてのブロックの処理が終了したと判定した場合、すなわち、フレームt上のすべてのブロックにおいて動きベクトルVが検出されたと判定した場合、動きベクトル検出処理を終了させる。その後、処理は図5のステップS2に戻り、それ以降の処理が行われる。   If the initial vector selection unit 31 determines in step S25 that all the blocks have been processed, that is, if it is determined that the motion vectors V have been detected in all the blocks on the frame t, the initial vector selection unit 31 performs the motion vector detection process. Terminate. Thereafter, the processing returns to step S2 in FIG. 5 and the subsequent processing is performed.

次に、図22のフローチャートを参照して、図21のステップS22において行われる初期ベクトル選択処理について説明する。   Next, the initial vector selection process performed in step S22 of FIG. 21 will be described with reference to the flowchart of FIG.

ステップS31において、候補ベクトル位置演算部51(図7)は、選択された着目ブロックの周辺領域から、予め設定されている着目ブロックの初期候補ベクトルを取得する候補ブロックの位置と、初期候補ベクトルの種類、優先順位を求める。   In step S31, the candidate vector position calculation unit 51 (FIG. 7) obtains the position of the candidate block for obtaining the preset initial candidate vector of the target block from the peripheral region of the selected target block, and the initial candidate vector Find the type and priority.

ステップS32において、候補ベクトル位置演算部51は、ステップS31で求めた優先順位の順に、候補ブロックの初期候補ベクトルの種類が過去ベクトルまたは現在ベクトルであるか否かを判定する。   In step S32, the candidate vector position calculation unit 51 determines whether or not the type of the initial candidate vector of the candidate block is a past vector or a current vector in the order of priority obtained in step S31.

ステップS32において、候補ベクトル位置演算部51は、候補ブロックの初期候補ベクトルの種類が過去ベクトルまたは現在ベクトルであると判定した場合、候補ブロックの位置情報と初期候補ベクトルの種類情報を検出ベクトル取得部52に出力し、ステップS33に進む。   In step S32, when the candidate vector position calculation unit 51 determines that the type of the initial candidate vector of the candidate block is a past vector or the current vector, the candidate vector position calculation unit 51 detects the position information of the candidate block and the type information of the initial candidate vector. The process proceeds to step S33.

ステップS33において、検出ベクトル取得部52は、候補ブロックの位置と初期候補ベクトルの種類に応じた動きベクトル(過去ベクトルPVまたは現在ベクトルCV)を検出ベクトルメモリ13から取得し、取得した動きベクトルをオフセット位置演算部54に出力する。   In step S33, the detection vector acquisition unit 52 acquires a motion vector (past vector PV or current vector CV) corresponding to the position of the candidate block and the type of the initial candidate vector from the detection vector memory 13, and offsets the acquired motion vector. It outputs to the position calculation part 54.

一方、ステップS32において、候補ベクトル位置演算部51は、候補ブロックの初期候補ベクトルの種類が過去ベクトルまたは現在ベクトルでないと判定した場合、ステップS34に進み、次に、候補ブロックの初期候補ベクトルの種類がシフト初期ベクトルであるか否かを判定する。   On the other hand, if the candidate vector position calculation unit 51 determines in step S32 that the type of the initial candidate vector of the candidate block is not the past vector or the current vector, the process proceeds to step S34, and then the type of the initial candidate vector of the candidate block. Is a shifted initial vector.

候補ベクトル位置演算部51は、ステップS34において、候補ブロックの初期候補ベクトルの種類がシフト初期ベクトルであると判定した場合、候補ブロックの位置情報と初期候補ベクトルの種類情報をシフト初期ベクトル取得部53に出力し、ステップS35に進む。   If the candidate vector position calculation unit 51 determines in step S34 that the type of the initial candidate vector of the candidate block is a shifted initial vector, the candidate vector position calculation unit 51 obtains the position information of the candidate block and the type information of the initial candidate vector as a shifted initial vector acquisition unit 53. And proceed to step S35.

ステップS35において、シフト初期ベクトル取得部53は、候補ブロックの位置に対応したシフト初期ベクトルをシフト初期ベクトルメモリ37から取得し、取得したシフト初期ベクトルをオフセット位置演算部54に出力する。   In step S <b> 35, the shifted initial vector acquisition unit 53 acquires the shifted initial vector corresponding to the position of the candidate block from the shifted initial vector memory 37 and outputs the acquired shifted initial vector to the offset position calculation unit 54.

一方、ステップS34において、候補ベクトル位置演算部51は、候補ブロックの初期候補ベクトルの種類がシフト初期ベクトルではないと判定した場合、すなわち、候補ブロックの初期候補ベクトルの種類が0ベクトルであると判定した場合、ステップS36に進む。   On the other hand, in step S34, the candidate vector position calculation unit 51 determines that the type of the initial candidate vector of the candidate block is not the shifted initial vector, that is, determines that the type of the initial candidate vector of the candidate block is the 0 vector. If so, the process proceeds to step S36.

ステップS36において、候補ベクトル位置演算部51は、初期候補ベクトルに0ベクトルを設定し、0ベクトルとともに、候補ブロックの位置情報をオフセット位置演算部54に出力する。なお、ステップS33,S35においても、候補ブロックの位置情報がオフセット位置演算部54に出力されている。   In step S36, the candidate vector position calculation unit 51 sets a zero vector as the initial candidate vector, and outputs the position information of the candidate block together with the zero vector to the offset position calculation unit 54. Note that the position information of the candidate block is also output to the offset position calculation unit 54 in steps S33 and S35.

ステップS37において、オフセット位置演算部54は、候補ベクトル位置演算部51から供給されてきた候補ブロックの位置情報に基づいて、それぞれの初期候補ベクトルに対して、フレームtの着目ブロックをフレームt+1にオフセットさせたオフセット先のブロック位置を求め、求めたオフセット先ブロック位置の情報を、初期候補ベクトル、候補ブロックの位置情報とともに評価値演算部55に出力する。   In step S37, the offset position calculation unit 54 sets the target block of the frame t to the frame t + 1 for each initial candidate vector based on the position information of the candidate blocks supplied from the candidate vector position calculation unit 51. The offset destination block position that has been offset to is obtained, and information on the obtained offset destination block position is output to the evaluation value calculation unit 55 together with the initial candidate vector and the candidate block position information.

ステップS38において、評価値演算部55は、オフセット位置演算部54から供給されてきた情報と、フレームt,t+1から初期候補ベクトルの評価値DFDを求め、求めた評価値DFDを、初期候補ベクトルとともに評価値比較部56に出力する。   In step S38, the evaluation value calculation unit 55 obtains the evaluation value DFD of the initial candidate vector from the information supplied from the offset position calculation unit 54 and the frames t and t + 1, and uses the obtained evaluation value DFD as the initial candidate. The result is output to the evaluation value comparison unit 56 together with the vector.

ステップS39において、評価値比較部56は、評価値演算部55により求められた評価値DFDが、最適候補格納用レジスタ57に格納されている最適候補ベクトルの評価値DFDより小さいか否かを判定する。   In step S39, the evaluation value comparison unit 56 determines whether or not the evaluation value DFD obtained by the evaluation value calculation unit 55 is smaller than the evaluation value DFD of the optimum candidate vector stored in the optimum candidate storage register 57. To do.

評価値比較部56は、ステップS39において、評価値演算部55により求められた評価値DFDの方が、最適候補格納用レジスタ57に格納されている最適候補ベクトルの評価値DFDより小さいと判定した場合、ステップS40に進み、最適候補格納用レジスタ57に記憶されている最適候補ベクトルとその評価値DFDを、信頼度が高いとされた初期候補ベクトルとその評価値DFDで書き換える。   In step S39, the evaluation value comparison unit 56 determines that the evaluation value DFD obtained by the evaluation value calculation unit 55 is smaller than the evaluation value DFD of the optimum candidate vector stored in the optimum candidate storage register 57. In step S40, the optimum candidate vector and its evaluation value DFD stored in the optimum candidate storage register 57 are rewritten with the initial candidate vector and its evaluation value DFD that are determined to have high reliability.

ステップS39において、評価値演算部55により求められた評価値DFDが、最適候補格納用レジスタ57に格納されている最適候補ベクトルの評価値DFDより小さくないと判定された場合、ステップS40の処理はスキップされる。   If it is determined in step S39 that the evaluation value DFD obtained by the evaluation value calculator 55 is not smaller than the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 57, the process of step S40 is performed. Skipped.

ステップS41において、候補ベクトル位置演算部51は、すべての初期候補ベクトルの処理が終了したか否かを判定し、すべての初期候補ベクトルの処理が終了していないと判定した場合、ステップS32に戻り、それ以降の処理を繰り返す。   In step S41, the candidate vector position calculation unit 51 determines whether or not all the initial candidate vectors have been processed. If it is determined that all the initial candidate vectors have not been processed, the process returns to step S32. Repeat the subsequent processing.

一方、ステップS41において、すべての初期候補ベクトルの処理が終了したと判定された場合、ステップS42に進み、評価値比較部56は、最適候補格納用レジスタ57に記憶されている、信頼度が最も高いとされた最適候補ベクトルを初期ベクトルV0として反復勾配法演算部33に出力させる。その後、図21のステップS22に戻り、それ以降の処理が行われる。   On the other hand, if it is determined in step S41 that all the initial candidate vectors have been processed, the process proceeds to step S42, where the evaluation value comparison unit 56 has the highest reliability stored in the optimum candidate storage register 57. The optimal candidate vector determined to be high is output to the iterative gradient method computing unit 33 as the initial vector V0. Thereafter, the process returns to step S22 in FIG. 21, and the subsequent processing is performed.

以上のように、複数の初期候補ベクトルの評価値DFDを求め、評価値DFDが最も小さい、すなわち、信頼度が最も高い初期候補ベクトルを初期ベクトルとして選択するようにしたので、後段の動きベクトル検出に最適な初期ベクトルを与えることができる。また、予め定められたブロックの動きベクトルを初期候補ベクトルとして用いるようにしたので、初期候補ベクトルの数が多くなってしまい、演算量が膨大になってしまうことが抑制される。   As described above, the evaluation value DFD of a plurality of initial candidate vectors is obtained, and the initial candidate vector having the smallest evaluation value DFD, that is, the highest reliability is selected as the initial vector. An optimal initial vector can be given. In addition, since the motion vector of a predetermined block is used as the initial candidate vector, the number of initial candidate vectors is increased, and the amount of calculation is suppressed from becoming enormous.

次に、図23のフローチャートを参照して、図21のステップS23において行われる反復勾配法演算評価処理について説明する。   Next, the iterative gradient method computation evaluation process performed in step S23 of FIG. 21 will be described with reference to the flowchart of FIG.

ステップS51において、モード選択部71(図10)は、ブロック単位処理モードを選択する。これにより、フレームt上のブロックが検出対象ブロック(演算ブロック)とされ、検出対象ブロックの初期ベクトルV0がベクトル評価部34とセレクタ72に出力される。   In step S51, the mode selection unit 71 (FIG. 10) selects a block unit processing mode. As a result, the block on the frame t is set as a detection target block (calculation block), and the initial vector V0 of the detection target block is output to the vector evaluation unit 34 and the selector 72.

ステップS52において、セレクタ72は、モード選択部71から供給されてきた初期ベクトルV0をオフセットベクトルとして有効画素判断部73(図13の時間画素差分算出部81)と勾配法演算部74(図17の時間画素差分算出部91)に出力する。   In step S52, the selector 72 uses the initial vector V0 supplied from the mode selection unit 71 as an offset vector, and the effective pixel determination unit 73 (time pixel difference calculation unit 81 in FIG. 13) and the gradient method calculation unit 74 (in FIG. 17). It outputs to the time pixel difference calculation part 91).

ステップS53において、有効画素判断部73はブロック単位の有効画素判定処理を実行する。この有効画素判定処理により、ブロック単位の演算ブロックに含まれる有効画素の数がカウントされる。有効画素判定処理の詳細については、図24のフローチャートを参照して後述する。   In step S <b> 53, the effective pixel determination unit 73 executes a block-based effective pixel determination process. By this effective pixel determination processing, the number of effective pixels included in the calculation block in block units is counted. Details of the effective pixel determination processing will be described later with reference to the flowchart of FIG.

ステップS54において、有効画素判断部73(図13の勾配法継続判断部84)は、有効画素数がしきい値αより多いか否かを判定し、有効画素数がしきい値αより多いと判定した場合、勾配法演算をブロック単位で実行させるフラグ(flg=1)を勾配法演算部74に出力する。   In step S54, the effective pixel determination unit 73 (gradient method continuation determination unit 84 in FIG. 13) determines whether or not the number of effective pixels is greater than the threshold value α, and if the number of effective pixels is greater than the threshold value α. If it is determined, a flag (flg = 1) for executing the gradient method calculation in units of blocks is output to the gradient method calculation unit 74.

ステップS55において、勾配法演算部74はブロック単位の勾配法演算処理を実行する。この勾配法演算処理により動きベクトルVnが求められ、求められた動きベクトルVnがベクトル評価部34と遅延部75に出力される。ブロック単位の勾配法演算処理の詳細については、図25のフローチャートを参照して後述する。   In step S55, the gradient method computing unit 74 executes gradient method computation processing in units of blocks. A motion vector Vn is obtained by this gradient method arithmetic processing, and the obtained motion vector Vn is output to the vector evaluation unit 34 and the delay unit 75. Details of the gradient method calculation processing in units of blocks will be described later with reference to the flowchart of FIG.

ステップS56において、ベクトル評価部34は、反復勾配法演算部33により求められた動きベクトルVnの評価値DFD(n)と、オフセットベクトルとして用いられた動きベクトルVn-1の評価値DFD(n-1)を求め、評価値DFD(n-1)よりも評価値DFD(n)の方が小さいか否かを判定する。例えば、1回目の処理においては、求められた動きベクトルV1の評価値DFD(1)と、オフセットベクトルとして用いられた初期ベクトルV0の評価値DFD(0)が比較され、2回目の処理においては、求められた動きベクトルV2の評価値DFD(2)と、オフセットベクトルとして用いられた動きベクトルV1の評価値DFD(1)が比較される。   In step S56, the vector evaluation unit 34 evaluates the motion vector Vn obtained by the iterative gradient method computing unit 33 and the evaluation value DFD (n−) of the motion vector Vn−1 used as the offset vector. 1) is obtained, and it is determined whether or not the evaluation value DFD (n) is smaller than the evaluation value DFD (n−1). For example, in the first process, the obtained evaluation value DFD (1) of the motion vector V1 is compared with the evaluation value DFD (0) of the initial vector V0 used as the offset vector. In the second process, The obtained evaluation value DFD (2) of the motion vector V2 is compared with the evaluation value DFD (1) of the motion vector V1 used as the offset vector.

ベクトル評価部34は、ステップS56において、評価値DFD(n-1)よりも評価値DFD(n)の方が小さいと判定した場合、すなわち、動きベクトルVn-1よりも動きベクトルVnの信頼度が高いと判定した場合、ステップS57に進み、算出された動きベクトルVnを、検出対象ブロックの動きベクトルVとして設定する。   In step S56, the vector evaluation unit 34 determines that the evaluation value DFD (n) is smaller than the evaluation value DFD (n-1), that is, the reliability of the motion vector Vn than the motion vector Vn-1. When it is determined that the motion vector is high, the process proceeds to step S57, and the calculated motion vector Vn is set as the motion vector V of the detection target block.

ステップS58において、ベクトル評価部34は反復回数nを1つカウントし、ステップS59に進み、反復回数nが、設定された最大反復回数(例えば、2回)に達したか否かを判定する。   In step S58, the vector evaluation unit 34 counts the number of iterations n by 1, and proceeds to step S59 to determine whether or not the number of iterations n has reached a set maximum number of iterations (for example, 2 times).

ベクトル評価部34は、ステップS59において、反復回数nが最大反復回数に達していないと判定した場合、ステップS52に戻り、それ以降の処理を繰り返させる。すなわち、遅延部75に保持されていた動きベクトルV1がオフセットベクトルとして選択され、それ以降の処理が行われる。   If it is determined in step S59 that the number of iterations n has not reached the maximum number of iterations, the vector evaluation unit 34 returns to step S52 and repeats the subsequent processing. That is, the motion vector V1 held in the delay unit 75 is selected as an offset vector, and the subsequent processing is performed.

また、ステップS56において、ベクトル評価部34は、評価値DFD(n-1)よりも評価値DFD(n)の方が小さくないと判定した場合、すなわち、動きベクトルVn-1の方が、動きベクトルVnよりも信頼度が高いと判定した場合、ステップS60に進み、勾配法演算のオフセットとしたベクトルVn-1を、検出対象ブロックの動きベクトルVに設定する。   In step S56, the vector evaluation unit 34 determines that the evaluation value DFD (n) is not smaller than the evaluation value DFD (n-1), that is, the motion vector Vn-1 has a motion. When it is determined that the reliability is higher than that of the vector Vn, the process proceeds to step S60, and the vector Vn-1 as an offset of the gradient method calculation is set as the motion vector V of the detection target block.

ステップS59において、反復回数nが最大反復回数に達したと判定された場合、または、ステップS60において、ベクトルVn-1が検出対象ブロックの動きベクトルVとして設定された場合、ステップS61に進み、ベクトル評価部34は、動きベクトルVが、動きベクトルを検出する範囲として予め設定されたサーチエリア内であるか否かを判定する。   If it is determined in step S59 that the number of iterations n has reached the maximum number of iterations, or if the vector Vn-1 is set as the motion vector V of the detection target block in step S60, the process proceeds to step S61. The evaluation unit 34 determines whether or not the motion vector V is within a search area set in advance as a range for detecting a motion vector.

ベクトル評価部34は、ステップS61において、動きベクトルVがサーチエリア内であると判定した場合、ステップS62に進み、動きベクトルVを、検出対象ブロックに対応させて検出ベクトルメモリ13に記憶させる。   If the vector evaluation unit 34 determines in step S61 that the motion vector V is within the search area, the vector evaluation unit 34 proceeds to step S62 and stores the motion vector V in the detection vector memory 13 in association with the detection target block.

また、ベクトル評価部34は、ステップS61において、動きベクトルVがサーチエリア内ではないと判定した場合、ステップS63に進み、0ベクトルを動きベクトルVとして設定し、それを、ステップS62において検出対象ブロックに対応させて検出ベクトルメモリ13に記憶させる。   If the vector evaluation unit 34 determines in step S61 that the motion vector V is not within the search area, the vector evaluation unit 34 proceeds to step S63, sets the 0 vector as the motion vector V, and sets it as the detection target block in step S62. And stored in the detection vector memory 13.

一方、有効画素判断部73は、ステップS54において、有効画素数がしきい値α以下であると判定した場合、ステップS64に進み、モード選択部71を制御し、画素単位処理モードを選択させる。   On the other hand, if the effective pixel determination unit 73 determines in step S54 that the number of effective pixels is equal to or less than the threshold value α, the process proceeds to step S64, where the mode selection unit 71 is controlled to select the pixel unit processing mode.

ステップS65において、反復勾配法演算部33は画素単位の勾配法演算処理を実行する。この反復勾配法演算処理により、検出対象ブロック内の全画素の動きベクトルVが求められる。求められた動きベクトルVはステップS62において検出ベクトルメモリ13に記憶される。画素単位の勾配法演算処理の詳細については、図26のフローチャートを参照して後述する。   In step S65, the iterative gradient method computing unit 33 executes a gradient method computation process in units of pixels. By this iterative gradient method computing process, motion vectors V of all the pixels in the detection target block are obtained. The obtained motion vector V is stored in the detection vector memory 13 in step S62. Details of the gradient method calculation processing in units of pixels will be described later with reference to the flowchart of FIG.

ステップS62において動きベクトルVが検出ベクトルメモリ13内に記憶された後、図21のステップS23に戻り、それ以降の処理が行われる。   After the motion vector V is stored in the detection vector memory 13 in step S62, the process returns to step S23 in FIG. 21, and the subsequent processing is performed.

次に、図24のフローチャートを参照して、図23のステップS53において行われる有効画素判定処理について説明する。   Next, the effective pixel determination process performed in step S53 in FIG. 23 will be described with reference to the flowchart in FIG.

ステップS71において、有効画素判断部73の時間画素差分算出部81(図13)は、画素差分値判断部82を制御して有効画素数カウンタ83をリセットさせ、ステップS72に進み、演算ブロックを構成する画素のうちの1つの画素を選択する。ここでは、例えば、演算ブロックの左上の画素からラスタ順に選択される。   In step S71, the temporal pixel difference calculation unit 81 (FIG. 13) of the effective pixel determination unit 73 controls the pixel difference value determination unit 82 to reset the effective pixel number counter 83, and the process proceeds to step S72 to configure a calculation block. One of the pixels to be selected is selected. Here, for example, the pixels are selected in raster order from the upper left pixel of the calculation block.

時間画素差分算出部81は、ステップS73において、セレクタ72から供給されてきたオフセットベクトルと、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、ステップS72で選択した画素の時間方向の画素差分Δtを算出し、算出した画素差分Δtを画素差分値判断部82に出力する。   In step S73, the time pixel difference calculation unit 81 uses the offset vector supplied from the selector 72 and the frames t and t + 1 supplied from the pre-filters 32-1 and 32-2 in step S73. The pixel difference Δt in the time direction of the selected pixel is calculated, and the calculated pixel difference Δt is output to the pixel difference value determination unit 82.

ステップS74において、画素差分値判断部82は、時間方向の画素差分Δtが所定の画素差分値よりも小さいか否か、すなわち、いま選択されている画素が、後段の勾配法演算に有効な画素であるか否かを判定する。   In step S74, the pixel difference value determination unit 82 determines whether or not the pixel difference Δt in the time direction is smaller than a predetermined pixel difference value, that is, the currently selected pixel is effective for the gradient method calculation in the subsequent stage. It is determined whether or not.

画素差分値判断部82は、ステップS74において、画素差分Δtが所定の画素差分値よりも小さいと判定した場合、ステップS75に進み、有効画素数カウンタ83においてカウントされる有効画素の数を1つインクリメントさせる。   If the pixel difference value determination unit 82 determines in step S74 that the pixel difference Δt is smaller than the predetermined pixel difference value, the pixel difference value determination unit 82 proceeds to step S75 and increments the number of effective pixels counted by the effective pixel number counter 83 by one. Increment.

また、画素差分値判断部82は、ステップS74において、画素差分Δtが所定の画素差分値以上であると判定した場合、すなわち、いま選択されている画素が勾配法演算に有効な画素ではないと判定した場合、ステップS75の処理をスキップし、ステップS76に進む。   If the pixel difference value determination unit 82 determines in step S74 that the pixel difference Δt is greater than or equal to the predetermined pixel difference value, that is, the currently selected pixel is not a valid pixel for the gradient method calculation. When it determines, the process of step S75 is skipped and it progresses to step S76.

ステップS76において、時間画素差分算出部81は、演算ブロック内のすべての画素の処理が終了したか否かを判定し、演算ブロック内のすべての画素の処理が終了していないと判定した場合、ステップS72に戻り、次の画素を選択し、それ以降の処理を繰り返す。   In step S76, the time pixel difference calculation unit 81 determines whether or not the processing of all the pixels in the calculation block has been completed, and determines that the processing of all the pixels in the calculation block has not ended. Returning to step S72, the next pixel is selected, and the subsequent processing is repeated.

時間画素差分算出部81は、ステップS76において、演算ブロック内のすべての画素の処理が終了したと判定した場合、図23のステップS53に戻り、それ以降の処理を行わせる。   If the time pixel difference calculation unit 81 determines in step S76 that the processing of all the pixels in the calculation block has been completed, the time pixel difference calculation unit 81 returns to step S53 in FIG. 23 to perform the subsequent processing.

次に、図25のフローチャートを参照して、図23のステップS55において行われるブロック単位の勾配法演算処理について説明する。   Next, with reference to the flowchart of FIG. 25, the gradient method calculation processing in units of blocks performed in step S55 of FIG. 23 will be described.

ステップS91において、勾配法演算部74の時間画素差分算出部91(図17)は、演算ブロックを構成する画素のうちの1つの画素を選択する。例えば、演算ブロックの左上の画素からラスタ順に選択される。   In step S91, the temporal pixel difference calculation unit 91 (FIG. 17) of the gradient method calculation unit 74 selects one pixel from among the pixels constituting the calculation block. For example, the pixels are selected in raster order from the upper left pixel of the calculation block.

ステップS92において、時間画素差分算出部91は、セレクタ72から供給されてきたオフセットベクトルと、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、ステップS91で選択した画素の時間方向の画素差分Δtを算出し、算出した画素差分Δtとオフセットベクトルを画素差分値判断部92に出力する。   In step S92, the time pixel difference calculation unit 91 uses the offset vector supplied from the selector 72 and the frames t and t + 1 supplied from the pre-filters 32-1 and 32-2 in step S91. The pixel difference Δt in the time direction of the selected pixel is calculated, and the calculated pixel difference Δt and the offset vector are output to the pixel difference value determination unit 92.

ステップS93において、画素差分値判断部92は、算出された画素差分Δtが所定の画素差分値よりも小さいか否か、すなわち、いま選択されている画素が勾配法演算に有効な画素であるか否かを判定する。   In step S93, the pixel difference value determination unit 92 determines whether or not the calculated pixel difference Δt is smaller than a predetermined pixel difference value, that is, whether the currently selected pixel is a valid pixel for the gradient method calculation. Determine whether or not.

画素差分値判断部92は、ステップS93において、画素差分Δtが所定の画素差分値よりも小さいと判定した場合、時間方向の画素差分Δtとオフセットベクトルを垂直水平画素差分算出部93に出力する。   When determining that the pixel difference Δt is smaller than the predetermined pixel difference value in Step S93, the pixel difference value determining unit 92 outputs the pixel difference Δt in the time direction and the offset vector to the vertical horizontal pixel difference calculating unit 93.

ステップS94において、垂直水平画素差分算出部93は、画素差分値判断部92から供給されてきたオフセットベクトルと、プリフィルタ32−1,32−2から供給されてきたフレームt,t+1を用いて、有効であると判定された画素の水平方向の画素差分Δxを算出する。   In step S94, the vertical / horizontal pixel difference calculation unit 93 uses the offset vector supplied from the pixel difference value determination unit 92 and the frames t and t + 1 supplied from the pre-filters 32-1 and 32-2. Then, the pixel difference Δx in the horizontal direction of the pixel determined to be effective is calculated.

また、垂直水平画素差分算出部93は、ステップS95において、有効であると判定された画素の垂直方向の画素差分Δyを算出し、算出した水平方向の画素差分Δxと垂直方向の画素差分Δyを、時間方向の画素差分Δtとともに勾配積算部94に出力する。   Further, the vertical horizontal pixel difference calculation unit 93 calculates the vertical pixel difference Δy of the pixel determined to be valid in step S95, and calculates the calculated horizontal pixel difference Δx and the vertical pixel difference Δy. , The pixel difference Δt in the time direction is output to the gradient integration unit 94.

ステップS96において、勾配積算部94は、垂直水平画素差分算出部93から供給されてきた画素差分Δt,Δx,Δyを積算し、積算した結果をベクトル算出部95に出力する。   In step S <b> 96, the gradient integration unit 94 integrates the pixel differences Δt, Δx, Δy supplied from the vertical / horizontal pixel difference calculation unit 93 and outputs the integration result to the vector calculation unit 95.

一方、ステップS93において、画素差分値判断部92は、時間方向の画素差分Δtが、所定の画素差分値以上であると判定した場合、ステップS94乃至S96の処理をスキップし、ステップS97に進む。すなわち、この場合、いま選択されている画素は、勾配法演算に有効な画素ではないので、その画素差分値は演算に用いられない。   On the other hand, if the pixel difference value determination unit 92 determines in step S93 that the pixel difference Δt in the time direction is greater than or equal to the predetermined pixel difference value, the process of steps S94 to S96 is skipped and the process proceeds to step S97. That is, in this case, since the currently selected pixel is not a pixel effective for the gradient method calculation, the pixel difference value is not used for the calculation.

ステップS97において、時間画素差分算出部91は、演算ブロック内のすべての画素の処理が終了したか否かを判定し、演算ブロック内のすべての画素の処理が終了していないと判定した場合、ステップS91に戻り、次の画素を選択し、それ以降の処理を繰り返す。   In step S97, the time pixel difference calculation unit 91 determines whether or not the processing of all the pixels in the calculation block has been completed, and determines that the processing of all the pixels in the calculation block has not ended. Returning to step S91, the next pixel is selected, and the subsequent processing is repeated.

一方、時間画素差分算出部91は、ステップS97において、演算ブロック内のすべての画素の処理が終了したと判定した場合、ベクトル算出部95にオフセットベクトルを出力する。   On the other hand, the time pixel difference calculation unit 91 outputs an offset vector to the vector calculation unit 95 when it is determined in step S97 that all the pixels in the calculation block have been processed.

ステップS98において、ベクトル算出部95は、勾配積算部94から供給されてきた勾配の積算結果と、上式(9)の最小自乗和を用いて動きベクトルvnを算出する。   In step S98, the vector calculation unit 95 calculates the motion vector vn using the integration result of the gradient supplied from the gradient integration unit 94 and the least square sum of the above equation (9).

ステップS99において、ベクトル算出部95は、ステップS98で算出した動きベクトルvnを、時間画素差分算出部91からのオフセットベクトルに加算することによって動きベクトルVnを求め、求めた動きベクトルVnをベクトル評価部34に出力する。その後、図23のステップS55に戻り、それ以降の処理が行われる。   In step S99, the vector calculation unit 95 obtains the motion vector Vn by adding the motion vector vn calculated in step S98 to the offset vector from the time pixel difference calculation unit 91, and calculates the obtained motion vector Vn as a vector evaluation unit. 34. Thereafter, the process returns to step S55 in FIG. 23, and the subsequent processing is performed.

以上のように、時間方向の画素差分Δtが所定の画素差分値以上の値である場合、そのとき選択している画素は、動きの乱れを発生させる恐れがあるものとして、動きベクトルを検出する際の勾配法の演算から除外するようにしたので、より安定した勾配法演算を行うことが可能となる。   As described above, when the pixel difference Δt in the time direction is a value greater than or equal to a predetermined pixel difference value, the pixel selected at that time is detected as a motion vector, and a motion vector is detected. Since the gradient method is excluded from the calculation of the gradient method, more stable gradient method calculation can be performed.

次に、図26のフローチャートを参照して、図23のステップS65において行われる画素単位の反復勾配法演算処理について説明する。この処理は、検出対象ブロック内の各画素を対象として行われる。   Next, with reference to the flowchart of FIG. 26, the iterative gradient method computing process in units of pixels performed in step S65 of FIG. 23 will be described. This process is performed for each pixel in the detection target block.

ステップS111において、モード選択部71は、検出対象ブロックを構成する画素のうちの1つの画素を検出対象画素として選択し、その画素の演算ブロック(例えば、9×9画素のブロック)の初期ベクトルV0を、ベクトル評価部34とセレクタ72に出力する。例えば、検出対象ブロックの左上の画素からラスタ順に画素が選択される。   In step S111, the mode selection unit 71 selects one of the pixels constituting the detection target block as a detection target pixel, and an initial vector V0 of a calculation block (for example, a 9 × 9 pixel block) of the pixel. Is output to the vector evaluation unit 34 and the selector 72. For example, pixels are selected in raster order from the upper left pixel of the detection target block.

ステップS112において、セレクタ72は、モード選択部71から供給されてきた初期ベクトルV0をオフセットベクトルとして有効画素判断部73(図13の時間画素差分算出部81)と勾配法演算部74(図17の時間画素差分算出部91)に出力する。   In step S112, the selector 72 uses the initial vector V0 supplied from the mode selection unit 71 as an offset vector, and the effective pixel determination unit 73 (time pixel difference calculation unit 81 in FIG. 13) and the gradient method calculation unit 74 (in FIG. 17). It outputs to the time pixel difference calculation part 91).

ステップS113において、有効画素判断部73は、選択されたオフセットベクトルを用いて画素単位の有効画素判定処理を実行する。ここでは、対象となる演算ブロックが異なる点を除いて、図24を参照して説明したブロック単位の有効画素判定処理と基本的に同様の処理が行われる。   In step S113, the effective pixel determination unit 73 performs an effective pixel determination process in units of pixels using the selected offset vector. Here, basically the same processing as the effective pixel determination processing in units of blocks described with reference to FIG. 24 is performed except that the target arithmetic block is different.

ステップS114において、有効画素判断部73(図13の勾配法継続判断部84)は、有効画素数がしきい値βより多いか否かを判定し、有効画素数がしきい値βより多いと判定した場合、勾配法演算を実行させるフラグ(flg=1)を勾配法演算部74に出力する。   In step S114, the effective pixel determination unit 73 (gradient method continuation determination unit 84 in FIG. 13) determines whether or not the number of effective pixels is greater than the threshold value β, and if the number of effective pixels is greater than the threshold value β. If it is determined, a flag (flg = 1) for executing the gradient method calculation is output to the gradient method calculation unit 74.

ステップS115において、勾配法演算部74は画素単位の勾配法演算処理を実行する。ここでは、対象となる演算ブロックが異なる点を除いて、図25のブロック単位の勾配法演算処理と同様の処理が行われる。すなわち、検出対象の画素の動きベクトルVnが求められ、求められた動きベクトルVnがベクトル評価部34と遅延部75(図10)に出力される。   In step S115, the gradient method computing unit 74 executes a gradient method computation process in units of pixels. Here, the same processing as the gradient method arithmetic processing in units of blocks in FIG. 25 is performed except that the target arithmetic blocks are different. That is, the motion vector Vn of the detection target pixel is obtained, and the obtained motion vector Vn is output to the vector evaluation unit 34 and the delay unit 75 (FIG. 10).

ステップS116において、ベクトル評価部34は、反復勾配法演算部33により求められた動きベクトルVnの評価値DFD(n)と、オフセットベクトルとして用いられた動きベクトルVn-1の評価値DFD(n-1)を求め、評価値DFD(n-1)よりも評価値DFD(n)の方が小さいか否かを判定する。   In step S116, the vector evaluating unit 34 evaluates the motion vector Vn obtained by the iterative gradient method computing unit 33, and the evaluated value DFD (n−) of the motion vector Vn−1 used as the offset vector. 1) is obtained, and it is determined whether or not the evaluation value DFD (n) is smaller than the evaluation value DFD (n−1).

ベクトル評価部34は、ステップS116において、評価値DFD(n-1)よりも評価値DFD(n)の方が小さいと判定した場合、すなわち、動きベクトルVn-1よりも動きベクトルVnの信頼度が高いと判定した場合、ステップS117に進み、算出された動きベクトルVnを検出対象画素の動きベクトルVとして設定する。   In step S116, the vector evaluation unit 34 determines that the evaluation value DFD (n) is smaller than the evaluation value DFD (n-1), that is, the reliability of the motion vector Vn than the motion vector Vn-1. When it is determined that is high, the process proceeds to step S117, and the calculated motion vector Vn is set as the motion vector V of the detection target pixel.

ステップS118において、ベクトル評価部34は、反復回数nを1つカウントし、ステップS119に進み、反復回数nが、設定された最大反復回数(例えば、2回)に達したか否かを判定する。   In step S118, the vector evaluation unit 34 counts the number of iterations n by 1, and proceeds to step S119 to determine whether or not the number of iterations n has reached a set maximum number of iterations (for example, 2 times). .

ベクトル評価部34は、ステップS119において、反復回数nが最大反復回数に達していないと判定した場合、ステップS112に戻り、それ以降の処理を繰り返させる。すなわち、遅延部75に保持されていた動きベクトルV1がオフセットベクトルとして選択され、それ以降の処理が行われる。   If the vector evaluation unit 34 determines in step S119 that the number of iterations n has not reached the maximum number of iterations, the vector evaluation unit 34 returns to step S112 and repeats the subsequent processing. That is, the motion vector V1 held in the delay unit 75 is selected as an offset vector, and the subsequent processing is performed.

ステップS119において、反復回数nが最大反復回数に達したと判定された場合、処理はステップS121に進む。   If it is determined in step S119 that the number of iterations n has reached the maximum number of iterations, the process proceeds to step S121.

また、ステップS116において、ベクトル評価部34は、評価値DFD(n-1)よりも評価値DFD(n)の方が小さくないと判定した場合、すなわち、動きベクトルVn-1の方が、動きベクトルVnよりも信頼度が高いと判定した場合、ステップS120に進み、勾配法演算のオフセットとしたベクトルVn-1を、検出対象ブロックの動きベクトルVに設定する。   In step S116, the vector evaluation unit 34 determines that the evaluation value DFD (n) is not smaller than the evaluation value DFD (n-1), that is, the motion vector Vn-1 has a motion. When it is determined that the reliability is higher than that of the vector Vn, the process proceeds to step S120, and the vector Vn-1 as an offset of the gradient method calculation is set as the motion vector V of the detection target block.

ステップS119において、反復回数nが最大反復回数に達したと判定された場合、または、ステップS120において、ベクトルVn-1が検出対象ブロックの動きベクトルVとして設定された場合、ステップS121に進み、ベクトル評価部34は、動きベクトルVが、動きベクトルを検出する範囲として予め設定されたサーチエリア内であるか否かを判定する。   If it is determined in step S119 that the number of iterations n has reached the maximum number of iterations, or if the vector Vn-1 is set as the motion vector V of the detection target block in step S120, the process proceeds to step S121. The evaluation unit 34 determines whether or not the motion vector V is within a search area set in advance as a range for detecting a motion vector.

ステップS121において、ベクトル評価部34は、動きベクトルVがサーチエリア内ではないと判定した場合、ステップS122に進む。   In step S121, when the vector evaluation unit 34 determines that the motion vector V is not within the search area, the process proceeds to step S122.

また、ステップS114において、有効画素判断部73は、有効画素数がしきい値βより少ないと判定した場合、勾配法演算を打ち切るフラグ(flg=0)を勾配法演算部74に出力し、ステップS122に進む。ステップS122において、ベクトル評価部34は、動きベクトルVを0ベクトルに設定する。   In step S114, if the effective pixel determination unit 73 determines that the number of effective pixels is smaller than the threshold value β, the effective pixel determination unit 73 outputs a flag (flg = 0) to stop the gradient method calculation to the gradient method calculation unit 74, and the step The process proceeds to S122. In step S122, the vector evaluation unit 34 sets the motion vector V to 0 vector.

ステップS121において、動きベクトルVがサーチエリア内であると判定された場合、または、ステップS122において、動きベクトルVが0ベクトルに設定された場合、処理はステップS123に進む。   If it is determined in step S121 that the motion vector V is within the search area, or if the motion vector V is set to 0 vector in step S122, the process proceeds to step S123.

ステップS123において、モード選択部71は、検出対象ブロック内のすべての画素の処理が終了したか否かを判定し、検出対象ブロック内のすべての画素の処理が終了していないと判定した場合、ステップS111に戻り、検出対象ブロックの次の画素を検出対象の画素として選択し、それ以降の処理を繰り返す。   In step S123, the mode selection unit 71 determines whether or not the processing of all the pixels in the detection target block has been completed, and determines that the processing of all the pixels in the detection target block has not been completed. Returning to step S111, the next pixel of the detection target block is selected as the detection target pixel, and the subsequent processing is repeated.

モード選択部71は、ステップS123において、検出対象ブロック内のすべての画素の処理が終了したと判定した場合、図23のステップS65に戻り、それ以降の処理を行わせる。   If the mode selection unit 71 determines in step S123 that all the pixels in the detection target block have been processed, the mode selection unit 71 returns to step S65 in FIG. 23 and performs the subsequent processing.

すなわち、画素単位の反復勾配法演算処理により、検出対象ブロック内すべての画素について動きベクトルVが求められ、求められた動きベクトルVが、検出対象ブロックの各画素に対応させた形で検出ベクトルメモリ13に記憶される。   That is, the motion vector V is obtained for all the pixels in the detection target block by the iterative gradient method computing process in units of pixels, and the detected vector memory is configured so that the obtained motion vector V corresponds to each pixel of the detection target block. 13 is stored.

次に、図27のフローチャートを参照して、図21のステップS24において行われるシフト初期ベクトル割り付け処理について説明する。   Next, the shifted initial vector allocation process performed in step S24 of FIG. 21 will be described with reference to the flowchart of FIG.

ステップS131において、シフト初期ベクトル割付部35の評価値比較部102(図18)は、動きベクトルVとともに、動きベクトルVの評価値DFDをベクトル評価部34から取得する。このとき、割付対象位置演算部101においても、動きベクトルVが取得される。   In step S131, the evaluation value comparison unit 102 (FIG. 18) of the shifted initial vector allocation unit 35 acquires the evaluation value DFD of the motion vector V from the vector evaluation unit 34 together with the motion vector V. At this time, the motion vector V is also acquired in the allocation target position calculation unit 101.

ステップS132において、割付対象位置演算部101は、動きベクトルVのフレームtにおけるオフセット(動き補償)先の割付対象ブロックの位置を求める。   In step S132, the allocation target position calculation unit 101 obtains the position of the allocation target block that is the offset (motion compensation) destination of the motion vector V in the frame t.

割付対象位置演算部101は、ステップS133において、ステップS132で求めた割付対象ブロックのうちの1つの割付対象ブロックを選択し、選択した割り付け対象ブロックの位置の情報を評価値メモリ36とシフト初期ベクトル置換部103に出力する。例えば、割付対象ブロックのうち、フレームt上において左上のブロックから順に割付対象ブロックが選択される。   In step S133, the allocation target position calculation unit 101 selects one allocation target block among the allocation target blocks obtained in step S132, and uses the evaluation value memory 36 and the shifted initial vector as information on the position of the selected allocation target block. The data is output to the replacement unit 103. For example, among the allocation target blocks, the allocation target blocks are selected in order from the upper left block on the frame t.

ステップS134において、評価値比較部102は、割付対象位置演算部101により選択された割付対象ブロックの評価値DFDを評価値メモリ36から取得し、ステップS135に進み、ステップS131で取得された動きベクトルVの評価値DFDが、評価値メモリ36に記憶されている評価値DFDよりも小さいか否かを判定する。   In step S134, the evaluation value comparison unit 102 acquires the evaluation value DFD of the allocation target block selected by the allocation target position calculation unit 101 from the evaluation value memory 36, proceeds to step S135, and the motion vector acquired in step S131. It is determined whether or not the evaluation value DFD of V is smaller than the evaluation value DFD stored in the evaluation value memory 36.

評価値比較部102は、ステップS135において、動きベクトルVの評価値DFDの方が、評価値メモリ36の評価値DFDよりも小さいと判定した場合、ステップS136に進み、シフト初期ベクトル置換部103を制御して、割付対象位置演算部101により選択された割付対象ブロックのシフト初期ベクトルメモリ37に記憶されているシフト初期ベクトルを、動きベクトルVに書き換えさせる。   If the evaluation value comparison unit 102 determines in step S135 that the evaluation value DFD of the motion vector V is smaller than the evaluation value DFD of the evaluation value memory 36, the evaluation value comparison unit 102 proceeds to step S136, and sets the shifted initial vector replacement unit 103. Then, the shift initial vector stored in the shift initial vector memory 37 of the allocation target block selected by the allocation target position calculation unit 101 is rewritten to the motion vector V.

また、評価値比較部102は、ステップS137において、評価値置換部104を制御して、割付対象位置演算部101により選択された割付対象ブロックの評価値DFDを、動きベクトルVの評価値DFDで書き換えさせる。   Further, in step S137, the evaluation value comparison unit 102 controls the evaluation value replacement unit 104 so that the evaluation value DFD of the allocation target block selected by the allocation target position calculation unit 101 is the evaluation value DFD of the motion vector V. Let them be rewritten.

ステップS137において評価値が書き換えられたとき、処理はステップS138に進む。また、ステップS135において、ステップS131において取得された動きベクトルVの評価値DFDが、評価値メモリ36に記憶されている評価値DFDよりも小さくないと判定された場合、ステップS136およびS137の処理はスキップされ、処理はステップS138に進む。   When the evaluation value is rewritten in step S137, the process proceeds to step S138. If it is determined in step S135 that the evaluation value DFD of the motion vector V acquired in step S131 is not smaller than the evaluation value DFD stored in the evaluation value memory 36, the processes in steps S136 and S137 are performed. Skipped and processing proceeds to step S138.

ステップS138において、割付対象位置演算部101は、動きベクトルVの割り付け対象ブロックのすべての処理が終了したか否かを判定し、すべての処理が終了していないと判定した場合、ステップS133に戻り、それ以降の処理を繰り返す。   In step S138, the allocation target position calculation unit 101 determines whether all the processes for the allocation target block of the motion vector V have been completed. If it is determined that all the processes have not been completed, the process returns to step S133. Repeat the subsequent processing.

割付対象位置演算部101は、ステップS138において、動きベクトルVの割り付け対象ブロックのすべての処理が終了したと判定した場合、図21のステップS24に戻り、それ以降の処理を行わせる。   If the allocation target position calculation unit 101 determines in step S138 that all the processes for the allocation target block of the motion vector V have been completed, the allocation target position calculation unit 101 returns to step S24 in FIG. 21 and performs the subsequent processing.

以上のように、連続するフレーム間において動物体の動き量にはある程度の連続性があること基づいて、前の時刻のフレームから、次の時刻のフレームの着目ブロックを通過する動きベクトルであるシフト初期ベクトルを、初期ベクトルの候補ベクトルとすることにより、周辺ブロックにおいて過去に求められた動きベクトルのみを初期ベクトルの候補とするときよりも、勾配法演算の初期値として適切な動きベクトルを与えることができる。   As described above, based on the fact that there is a certain degree of continuity in the amount of movement of the moving object between successive frames, a shift that is a motion vector that passes through the target block of the frame at the next time from the frame at the previous time By using the initial vector as the initial vector candidate vector, it is possible to give an appropriate motion vector as the initial value of the gradient method calculation, compared to the case where only the motion vector obtained in the past in the peripheral block is used as the initial vector candidate. Can do.

次に、動きベクトルの割り付けについて説明する。   Next, motion vector allocation will be described.

図28は、図1のベクトル割付部14の構成例を示すブロック図である。   FIG. 28 is a block diagram illustrating a configuration example of the vector allocation unit 14 of FIG.

上述したように、ベクトル割付部14においては、24P信号のフレームtの画素において検出された動きベクトルを、内挿フレームの画素に割り付ける処理が行われる。   As described above, the vector allocating unit 14 performs a process of allocating the motion vector detected in the pixel of the frame t of the 24P signal to the pixel of the interpolation frame.

画素情報演算部111は、検出ベクトルメモリ13に記憶されている、フレームtの画素において検出された動きベクトルを左上の画素のものからラスタ順に取得し、取得した動きベクトルを、次の時刻のフレームt+1方向に延ばして、その動きベクトルと内挿フレームとの交点を算出する。画素情報演算部111は、算出した交点から、動きベクトルの割付対象となる内挿フレーム上の画素(以下、割付対象画素という)を設定し、動きベクトルと割付対象画素の位置の情報をベクトル選択部115に出力する。   The pixel information calculation unit 111 acquires the motion vector detected in the pixel of the frame t stored in the detection vector memory 13 in raster order from the upper left pixel, and the acquired motion vector is obtained at the frame at the next time. Extending in the t + 1 direction, the intersection of the motion vector and the interpolation frame is calculated. The pixel information calculation unit 111 sets a pixel (hereinafter referred to as an allocation target pixel) on an interpolation frame to which a motion vector is allocated from the calculated intersection, and selects a vector of information on the position of the motion vector and the allocation target pixel. Output to the unit 115.

また、画像情報演算部111は、割付対象画素と、動きベクトルで対応付けられるフレームtの位置Pと、フレームt+1の位置Qを算出し、算出した位置の情報を評価値演算部112と着目画素差分演算部113に出力する。   In addition, the image information calculation unit 111 calculates the allocation target pixel, the position P of the frame t associated with the motion vector, and the position Q of the frame t + 1, and uses the calculated position information as the evaluation value calculation unit 112. The result is output to the target pixel difference calculation unit 113.

評価値演算部112は、割付対象画素と位置情報が画素情報演算部111から供給されてきたとき、位置Pと位置Qを中心としたDFD演算範囲(m×n)をそれぞれのフレーム上に設定し、それらのDFD演算範囲が画枠内にある場合、設定したDFD演算範囲を用いて、動きベクトルに対する割付対象画素の評価値DFDを求める。求められた評価値DFDはベクトル評価部114に出力される。   When the allocation target pixel and the position information are supplied from the pixel information calculation unit 111, the evaluation value calculation unit 112 sets a DFD calculation range (m × n) centered on the position P and the position Q on each frame. If the DFD calculation range is within the image frame, the evaluation value DFD of the allocation target pixel for the motion vector is obtained using the set DFD calculation range. The obtained evaluation value DFD is output to the vector evaluation unit 114.

着目画素差分演算部113は、割付対象画素と位置情報が画素情報演算部111から供給されてきたとき、フレームtの位置Pとフレームt+1の位置Qから、割付対象画素に対する輝度差分絶対値を求め、求めた輝度差分絶対値をベクトル評価部114に出力する。   The pixel-of-interest difference calculation unit 113, when the allocation target pixel and the position information are supplied from the pixel information calculation unit 111, from the position P of the frame t and the position Q of the frame t + 1, the luminance difference absolute value with respect to the allocation target pixel And the calculated luminance difference absolute value is output to the vector evaluation unit 114.

ベクトル評価部114は画素差分判断部121と評価値判断部122から構成される。そのうちの画素差分判断部121は、着目画素差分演算部113から供給されてきた割付対象画素に対する輝度差分絶対値が所定のしきい値よりも小さいか否かを判定する。   The vector evaluation unit 114 includes a pixel difference determination unit 121 and an evaluation value determination unit 122. Among them, the pixel difference determination unit 121 determines whether or not the luminance difference absolute value for the allocation target pixel supplied from the target pixel difference calculation unit 113 is smaller than a predetermined threshold value.

評価値判断部122は、割付対象画素に対する輝度差分絶対値が所定のしきい値よりも小さいと画素差分判断部121により判定された場合、評価値演算部112から供給されてきた割付対象画素の評価値DFDが、ベクトル選択部115が有するDFDテーブルの最小評価値より小さいか否かを判定する。評価値判断部122は、割付対象画素の評価値DFDの方が、DFDテーブルの最小評価値より小さいと判定した場合、割付対象画素に対応する動きベクトルの信頼度が高いと判定し、割付対象画素の評価値DFDをベクトル選択部115に出力する。   When the pixel difference determination unit 121 determines that the luminance difference absolute value for the allocation target pixel is smaller than a predetermined threshold, the evaluation value determination unit 122 determines the allocation target pixel supplied from the evaluation value calculation unit 112. It is determined whether or not the evaluation value DFD is smaller than the minimum evaluation value of the DFD table included in the vector selection unit 115. When the evaluation value determination unit 122 determines that the evaluation value DFD of the allocation target pixel is smaller than the minimum evaluation value of the DFD table, the evaluation value determination unit 122 determines that the reliability of the motion vector corresponding to the allocation target pixel is high, and the allocation target The pixel evaluation value DFD is output to the vector selection unit 115.

ベクトル選択部115はDFDテーブルを有している。このDFDテーブルには、内挿フレーム上の各画素に対して0ベクトルを割り付けた場合の評価値DFD0が、内挿フレーム上の各画素における最小評価値として保持されている。   The vector selection unit 115 has a DFD table. In this DFD table, an evaluation value DFD0 when a 0 vector is assigned to each pixel on the interpolation frame is held as a minimum evaluation value for each pixel on the interpolation frame.

また、ベクトル選択部115は、割付対象画素の評価値DFDがベクトル評価部114から供給されてきたとき、画素情報演算部111により算出された割付対象画素の位置の情報に基づいて割付フラグメモリ16のフラグを1(true)に書き換え、割付対象画素のDFDテーブルの最小評価値を、その割付対象画素の評価値DFDに書き換える。さらに、ベクトル選択部115は、割付ベクトルメモリ15の割付対象画素に、画素情報演算部111からの動きベクトルを割り付ける。   Further, the vector selection unit 115, when the evaluation value DFD of the allocation target pixel is supplied from the vector evaluation unit 114, the allocation flag memory 16 based on the position information of the allocation target pixel calculated by the pixel information calculation unit 111. Is rewritten to 1 (true), and the minimum evaluation value in the DFD table of the allocation target pixel is rewritten to the evaluation value DFD of the allocation target pixel. Further, the vector selection unit 115 allocates the motion vector from the pixel information calculation unit 111 to the allocation target pixel in the allocation vector memory 15.

ここで、ベクトル割付処理の概念について説明する。   Here, the concept of vector allocation processing will be described.

例えば、24P信号上でオブジェクトが速度vで動いており、任意の2フレーム間でオブジェクトの動きについて等速仮定が成り立つ場合において、24P信号のフレーム間にフレームを新しく内挿することを考える。この場合、24P信号のオブジェクトから動きベクトルvを延ばすと、動きベクトルvと内挿フレームとの交点は、同じオブジェクトの位置であり、同じ速度vを有する。   For example, when an object is moving at a speed v on a 24P signal and a constant velocity assumption is made about the movement of an object between any two frames, a new interpolation of frames between frames of the 24P signal is considered. In this case, when the motion vector v is extended from the 24P signal object, the intersection of the motion vector v and the interpolation frame is the same object position and has the same velocity v.

したがって、ベクトル検出部12で検出された24P信号のフレーム(以下、元フレームともいう)の動きベクトルを、その動きベクトルと、内挿する60P信号の内挿フレーム上との交点に割り付けることで、内挿フレーム上の各画素の動きを求めることができる。   Therefore, by assigning the motion vector of the frame of the 24P signal (hereinafter also referred to as the original frame) detected by the vector detection unit 12 to the intersection of the motion vector and the interpolation frame of the 60P signal to be interpolated, The movement of each pixel on the interpolation frame can be obtained.

図29は、24P信号の元フレームで検出された動きベクトルと、60P信号の内挿フレームの画素の例を1次元で示す図である。各フレーム上の丸は画素を表す。   FIG. 29 is a one-dimensional diagram illustrating an example of a motion vector detected in an original frame of a 24P signal and pixels of an interpolation frame of a 60P signal. A circle on each frame represents a pixel.

図29の例においては、2つの24P信号のフレームtとフレームt+1の間に、時刻t+0.4の内挿フレームF1と時刻t+0.8の内挿フレームF2が挿入されている。   In the example of FIG. 29, an interpolation frame F1 at time t + 0.4 and an interpolation frame F2 at time t + 0.8 are inserted between the frames t and t + 1 of the two 24P signals.

また、図29の例においては、ベクトル検出部12によりフレームtにおいて検出された動きベクトルv1,v2、およびv3がフレームt+1方向に延ばされている。これらの動きベクトルを内挿フレームF1とF2の各画素に割り付ける場合、内挿フレーム上の各画素の近傍を通る動きベクトルが、その画素に割り付けられる候補ベクトル(以下、割付候補ベクトルともいう)とされる。   In the example of FIG. 29, the motion vectors v1, v2, and v3 detected in the frame t by the vector detection unit 12 are extended in the frame t + 1 direction. When assigning these motion vectors to each pixel of the interpolation frames F1 and F2, a motion vector passing through the vicinity of each pixel on the interpolation frame is a candidate vector (hereinafter also referred to as an allocation candidate vector) assigned to that pixel. Is done.

例えば、フレームtの左側の画素から、フレームt+1の左から4,5番目の画素近傍に向かう動きベクトルv1は、内挿フレームF1の左から2番目と3番目の画素の間、内挿フレームF2の左から3番目と4番目の画素の間を通ることから、この動きベクトルv1は、動きベクトルv1が内挿フレームF1,F2と交差する点の近傍の領域N1に含まれる画素に割り付けられる割付候補ベクトルとなる。   For example, the motion vector v1 from the pixel on the left side of the frame t to the vicinity of the fourth and fifth pixels from the left of the frame t + 1 is interpolated between the second and third pixels from the left of the interpolation frame F1. Since it passes between the third and fourth pixels from the left of the frame F2, this motion vector v1 is assigned to the pixels included in the region N1 near the point where the motion vector v1 intersects the interpolation frames F1 and F2. Allocation candidate vector to be assigned.

また、フレームtの左から3番目の画素から、フレームt+1の左から2,3番目の画素近傍に向かう動きベクトルv2は、内挿フレームF1の左から2番目と3番目の画素の間、内挿フレームF2の左から2番目と3番目の画素の間を通ることから、この動きベクトルv2は、動きベクトルv2が内挿フレームF1,F2と交差する点の近傍の領域N2に含まれる画素に割り付けられる割付候補ベクトルとなる。   The motion vector v2 from the third pixel from the left of the frame t to the vicinity of the second and third pixels from the left of the frame t + 1 is between the second and third pixels from the left of the interpolation frame F1. Since this passes between the second and third pixels from the left of the interpolation frame F2, the motion vector v2 is included in the region N2 near the point where the motion vector v2 intersects the interpolation frames F1 and F2. This is an assignment candidate vector assigned to the pixel.

同様に、フレームtの左から5番目の画素から、フレームt+1の左から4,5番目の画素近傍への動きベクトルv3は、内挿フレームF1の左から4番目と5番目の画素の間、内挿フレームF2の左から4番目と5番目の画素の間を通ることから、この動きベクトルv3は、動きベクトルv3が内挿フレームF1,F2と交差する点の近傍の領域N3に含まれる画素に割り付けられる割付候補ベクトルとなる。   Similarly, the motion vector v3 from the fifth pixel from the left of the frame t to the vicinity of the fourth and fifth pixels from the left of the frame t + 1 is the fourth and fifth pixels from the left of the interpolation frame F1. Since this passes between the fourth and fifth pixels from the left of the interpolation frame F2, the motion vector v3 is included in the region N3 near the point where the motion vector v3 intersects the interpolation frames F1 and F2. It becomes an allocation candidate vector allocated to the pixels to be allocated.

以上のように、元フレームにおいて検出された動きベクトルの中から内挿フレームの各画素に割り付けられる割付候補ベクトルが求められ、それぞれの割付候補ベクトルについて求められる評価値DFD等に基づいて、内挿フレームのそれぞれの画素に1つの動きベクトルが割り付けられる。   As described above, an allocation candidate vector to be allocated to each pixel of the interpolation frame is obtained from the motion vectors detected in the original frame, and interpolation is performed based on the evaluation value DFD or the like obtained for each allocation candidate vector. One motion vector is assigned to each pixel of the frame.

なお、図29の例においては、内挿フレームの左端の画素と右端の画素(図中黒丸)には割付候補ベクトルが存在しないことから、その近傍を通る動きベクトルは示されていない。このような割付候補の動きベクトルが存在しない画素については、後述する割付補償処理により動きベクトルが割り付けられる。   In the example of FIG. 29, since no allocation candidate vector exists in the leftmost pixel and rightmost pixel (black circle in the figure) of the interpolation frame, a motion vector passing through the vicinity thereof is not shown. For such pixels for which there is no motion vector as an allocation candidate, a motion vector is allocated by an allocation compensation process described later.

次に、動きベクトルの評価について説明する。   Next, motion vector evaluation will be described.

図30は動きベクトルの評価について説明する図である。   FIG. 30 is a diagram for explaining motion vector evaluation.

図30の例においては、下から、フレームt,内挿フレームF1,フレームt+1が1次元的に示されている。   In the example of FIG. 30, the frame t, the interpolation frame F1, and the frame t + 1 are shown one-dimensionally from the bottom.

動きベクトルsvaは、フレームt上の画素(xa,ya)において検出された動きベクトルvaが、近傍の画素G4の割付候補ベクトルとして画素G4上にシフト(平行移動)されたものである。画素G4上にシフトされた動きベクトルsvaと、フレームtおよびフレームt+1との交点を、それぞれ点P、点Qとする。 Motion vector sv a is the pixel (x a, y a) of the frame t motion vector v a detected at is one that is shifted (parallel movement) on the pixel G4 as allocated candidate vectors neighboring pixels G4 is there. A motion vector sv a shifted on the pixel G4, the intersection of the frame t and frame t + 1, respectively point P, and the point Q.

ベクトル割付部14は、動きベクトルsvaの第1の評価として、点Pおよび点Qを中心としたDFD演算範囲をそれぞれ設定し、求めたDFD演算範囲が画枠をはみ出してしまうか否かを判定する。ベクトル割付部14は、点Pおよび点Qを中心としたDFD演算範囲が画枠をはみ出すと判定した場合、動きベクトルsvaを候補から除外する。 Vector allocating unit 14, a first evaluation of motion vector sv a, set the DFD operation range around the point P and point Q respectively, DFD operation range determined as to whether or not jutting out of the picture frame judge. Vector allocating unit 14, if the DFD operation range around the point P and the point Q is determined to protrude a picture frame, excluding a motion vector sv a from the candidate.

また、点Pおよび点Qが、例えば、異なるオブジェクトに属する場合、点Pの輝度値Ft(P)と点Qの輝度値Ft+1(Q)の差は大きくなる。したがって、ベクトル割付部14は、動きベクトルsvaの第2の評価として、点Pと点Qを用いて、画素G4における輝度差分絶対値dpを求め、輝度差分絶対値dpが所定の値より大きいか否かを判定する。輝度差分絶対値dpが所定の値より大きいと判定した場合、ベクトル割付部14は、動きベクトルsvaを候補から除外する。輝度差分絶対値dpは次式(11)で表される。 Further, when the point P and the point Q belong to different objects, for example, the difference between the luminance value F t (P) of the point P and the luminance value F t + 1 (Q) of the point Q becomes large. Accordingly, the vector allocating unit 14, a second evaluation of motion vector sv a, using the points P and Q, determine the luminance difference absolute value dp of the pixel G4, the luminance difference absolute value dp is greater than a predetermined value It is determined whether or not. If the luminance difference absolute value dp is determined to be greater than the predetermined value, the vector allocating unit 14 excludes the motion vector sv a from the candidate. The luminance difference absolute value dp is expressed by the following equation (11).

Figure 0004655215
Figure 0004655215

さらに、ベクトル割付部14は、動きベクトルsvaの第3の評価として、点Pおよび点Qを中心としたDFD演算範囲の相関値を表す差分絶対値による評価判定を行う。すなわち、ベクトル割付部14は、点Pと点Qを中心としたDFD演算範囲を用いて、画素G4における動きベクトルsvaの評価値DFDを求め、求められた評価値DFDがDFDテーブルの最小評価値よりも小さいか否かを判定する。ベクトル割付部14は、求められた評価値DFDの中で最小の評価値DFDを有する動きベクトルを画素G4に割り付ける。 Furthermore, the vector allocating unit 14, a third evaluation of the motion vector sv a, the evaluation determination by the difference absolute value that represents the correlation value DFD operation range around the point P and the point Q. That is, the vector allocating unit 14 uses the DFD operation range around the points P and Q, determine the evaluation value DFD of the motion vector sv a in the pixel G4, obtained evaluation value DFD is the minimum evaluation of DFD table It is determined whether it is smaller than the value. The vector assigning unit 14 assigns a motion vector having the smallest evaluation value DFD among the obtained evaluation values DFD to the pixel G4.

以上のように、内挿フレームの画素における割付候補の動きベクトルを、割付対象画素の評価値DFDだけでなく、割付対象画素における輝度差分絶対値などを用いて評価することにより、評価値DFDだけを用いる場合よりも確からしい動きベクトルを割り付けることができる。   As described above, only the evaluation value DFD is obtained by evaluating the motion vector of the allocation candidate at the pixel of the interpolation frame using not only the evaluation value DFD of the allocation target pixel but also the luminance difference absolute value at the allocation target pixel. It is possible to assign a motion vector that is more reliable than when using.

次に、動きベクトルの画素以下精度について説明する。   Next, the accuracy below the pixel of the motion vector will be described.

フレームtの画素位置pをベクトルv量分ずらした先のフレームt+1上の位相p+vが、24p信号のフレームt+1上の画素位置と一致しない場合があり、その場合の位相p+vにおける輝度値は定義されていない。したがって、画素以下精度を有する動きベクトルvに対する輝度差分絶対値dpや評価値DFDの演算を行うためには、画素以下の位相における輝度値を生成しなければならず、その輝度値を得るために、例えば、周辺4画素の輝度値による補間処理が用いられる。   The phase p + v on the previous frame t + 1 obtained by shifting the pixel position p of the frame t by the amount of the vector v may not coincide with the pixel position on the frame t + 1 of the 24p signal. The luminance value at + v is not defined. Therefore, in order to calculate the luminance difference absolute value dp and the evaluation value DFD with respect to the motion vector v having the accuracy below the pixel, the luminance value in the phase below the pixel must be generated. In order to obtain the luminance value For example, an interpolation process using the luminance values of the surrounding four pixels is used.

図31は、4点補間処理の概念を示す図である。   FIG. 31 is a diagram illustrating the concept of four-point interpolation processing.

図31においては、矢印Xはフレームt+1における水平方向を示し、矢印Yはフレームt+1における垂直方向を示す。このフレームt+1において、白丸はフレームt+1上の画素位置を表し、黒点は画素以下の(粒度の)位置を表す。   In FIG. 31, arrow X indicates the horizontal direction in frame t + 1, and arrow Y indicates the vertical direction in frame t + 1. In this frame t + 1, a white circle represents a pixel position on the frame t + 1, and a black dot represents a position (granularity) below the pixel.

また、ウインドウEに示される画素は、フレームt+1上における最左上の黒点p+vとその周辺4画素を拡大したものである。ウインドウEにおいて、白丸内のアルファベットは周辺4画素の輝度値を示している。   Further, the pixels shown in the window E are obtained by enlarging the upper left black point p + v on the frame t + 1 and the surrounding four pixels. In window E, the alphabet in the white circle indicates the luminance value of the surrounding four pixels.

このフレームt+1における最左上の黒点p+vが、図示しないフレームtの画素位置pをベクトルv量分ずらした先の位相p+vとすると、位相p+vの輝度値Ft+1(p+v)は、位相p+vの水平方向の画素以下成分α、および垂直方向の画素以下成分β、並びに、位相p+vの周辺4画素の輝度値L0乃至L4を用いて、周辺4画素の距離の逆比の和で求められる。すなわち、輝度値Ft+1(p+v)は次式(12)で表され、その輝度値Ft+1(p+v)が、輝度差分絶対値dpや評価値DFDの演算に用いられる。 Assuming that the upper left black point p + v in this frame t + 1 is the phase p + v after shifting the pixel position p of the frame t (not shown) by the vector v amount, the luminance value F t + 1 of the phase p + v (P + v) is obtained by using the horizontal pixel sub-component α and the vertical pixel sub-component β of the phase p + v and the luminance values L0 to L4 of the four peripheral pixels of the phase p + v. It is obtained as the sum of the inverse ratio of the distances of 4 pixels. That is, the luminance value F t + 1 (p + v) is expressed by the following equation (12), and the luminance value F t + 1 (p + v) is used for calculating the luminance difference absolute value dp and the evaluation value DFD. It is done.

Figure 0004655215
Figure 0004655215

なお、上述した初期ベクトル選択処理やベクトル検出処理、または、後述する割付補償処理時の評価値DFDの演算においても、この4点補間が適用される。   Note that this four-point interpolation is also applied to the calculation of the evaluation value DFD during the initial vector selection process, the vector detection process, and the allocation compensation process described later.

次に、以上のような構成を有するベクトル割付部14の各部の処理について説明する。   Next, processing of each unit of the vector allocation unit 14 having the above configuration will be described.

はじめに、図32のフローチャートを参照して、ベクトル割付部14により行われるベクトル割付処理の全体について説明する。この処理は、図5のステップS3において行われる処理である。   First, the entire vector allocation process performed by the vector allocation unit 14 will be described with reference to the flowchart of FIG. This process is a process performed in step S3 of FIG.

ステップS201において、画素情報演算部111は、新しい元フレームが入力されると、ベクトル選択部115を制御して割付フラグメモリ16の割付フラグを0(False)で初期化させる。   In step S201, when a new original frame is input, the pixel information calculation unit 111 controls the vector selection unit 115 to initialize the allocation flag in the allocation flag memory 16 with 0 (False).

また、画素情報演算部111は、ステップS202において、割付ベクトルメモリ15を0ベクトルで初期化させる。   In addition, in step S202, the pixel information calculation unit 111 initializes the allocation vector memory 15 with a zero vector.

画素情報演算部111は、ステップS203において、評価値演算部112を制御し、内挿フレームのすべての画素に対して0ベクトルを用いて評価値DFD0を算出させる。画素情報演算部111は、評価値演算部112により算出された0ベクトルの評価値DFD0を、内挿フレームの各画素に対する最小評価値としてベクトル選択部115に保持させる。   In step S203, the pixel information calculation unit 111 controls the evaluation value calculation unit 112 to calculate the evaluation value DFD0 using the 0 vector for all the pixels of the interpolation frame. The pixel information calculation unit 111 causes the vector selection unit 115 to hold the evaluation value DFD0 of the 0 vector calculated by the evaluation value calculation unit 112 as the minimum evaluation value for each pixel of the interpolation frame.

ステップS204において、画素情報演算部111は、検出ベクトルメモリ13上の元フレームから画素を選択する。例えば、フレームの左上の画素からラスタ順に画素が選択される。   In step S <b> 204, the pixel information calculation unit 111 selects a pixel from the original frame on the detection vector memory 13. For example, the pixels are selected in raster order from the upper left pixel of the frame.

ステップS205において、画素情報演算部111は画素位置演算処理を実行する。この処理により、ステップS204で選択された画素において検出された動きベクトルが割り付けられる内挿フレーム上の割付対象画素が算出され、算出された割付対象画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置が算出される。画素位置演算処理の詳細については、図33のフローチャートを参照して後述する。   In step S205, the pixel information calculation unit 111 executes a pixel position calculation process. By this process, the allocation target pixel on the interpolation frame to which the motion vector detected in the pixel selected in step S204 is allocated is calculated, and the element that is associated with the motion vector on the basis of the calculated allocation target pixel A position on the frame is calculated. Details of the pixel position calculation process will be described later with reference to the flowchart of FIG.

ステップS206において、画素情報演算部111は割付対象画素を選択し、選択した割付対象画素の位置情報と、その動きベクトルをベクトル選択部115に出力する。また、画素情報演算部111は、選択した割付対象画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置の情報を評価値演算部112と着目画素演算部113に出力する。   In step S <b> 206, the pixel information calculation unit 111 selects the allocation target pixel, and outputs the position information of the selected allocation target pixel and its motion vector to the vector selection unit 115. Further, the pixel information calculation unit 111 outputs, to the evaluation value calculation unit 112 and the pixel-of-interest calculation unit 113, information on the position on the original frame associated with the motion vector with reference to the selected allocation target pixel.

ステップS207において、割付対象画素に関して割付ベクトル評価処理が実行される。この割付ベクトル評価処理により、割付対象画素における動きベクトルの信頼度が判定され、信頼度が高いと判定された動きベクトルによって、割付ベクトルメモリ15に記憶されている動きベクトルが書き換えられる。割付ベクトル評価処理の詳細については、図34のフローチャートを参照して後述する。   In step S207, an allocation vector evaluation process is executed for the allocation target pixel. By this allocation vector evaluation process, the reliability of the motion vector in the allocation target pixel is determined, and the motion vector stored in the allocation vector memory 15 is rewritten by the motion vector determined to have high reliability. Details of the allocation vector evaluation process will be described later with reference to the flowchart of FIG.

ステップS208において、画素情報演算部111は、すべての割付対象画素の処理が終了したか否かを判定し、すべての割付対象画素の処理がまだ終了していないと判定した場合、ステップS206に戻り、次の割付対象画素を選択して、それ以降の処理を繰り返す。   In step S208, the pixel information calculation unit 111 determines whether or not the processing of all allocation target pixels has been completed. If it is determined that the processing of all allocation target pixels has not been completed, the process returns to step S206. Then, the next allocation target pixel is selected, and the subsequent processing is repeated.

一方、ステップS208において、すべての割付対象画素の処理が終了したと判定した場合、ステップS209に進み、画素情報演算部111は、検出ベクトルメモリ13上の元フレームのすべての画素の処理を終了したか否かを判定する。   On the other hand, if it is determined in step S208 that the processing for all the allocation target pixels has been completed, the process proceeds to step S209, and the pixel information calculation unit 111 has completed the processing for all the pixels in the original frame on the detection vector memory 13. It is determined whether or not.

画素情報演算部111は、ステップS209において、すべての画素の処理を終了していないと判定した場合、ステップS204に戻り、検出ベクトルメモリ13上の元フレームの次の画素を選択してそれ以降の処理を繰り返し、すべての画素についての処理を終了したと判定した場合、処理を終了させる。その後、処理は図5のステップS3に戻り、それ以降の処理が行われる。   If the pixel information calculation unit 111 determines in step S209 that all pixels have not been processed, the pixel information calculation unit 111 returns to step S204, selects the next pixel of the original frame on the detection vector memory 13, and thereafter If the process is repeated and it is determined that the process has been completed for all pixels, the process is terminated. Thereafter, the process returns to step S3 in FIG. 5, and the subsequent processes are performed.

次に、図33のフローチャートを参照して、図32のステップS205において行われる画素位置演算処理について説明する。   Next, the pixel position calculation process performed in step S205 in FIG. 32 will be described with reference to the flowchart in FIG.

ステップS221において、画素情報演算部111は、図32のステップS204で選択した画素で検出された動きベクトルを検出ベクトルメモリ13から取得する。なお、選択された画素の動きベクトルが0ベクトルである場合、割付ベクトルメモリ15には初期値として0ベクトルが予め記憶されているので、以降のステップS222乃至S224、および、図32のステップS206乃至S208の処理はスキップされる。   In step S221, the pixel information calculation unit 111 acquires, from the detection vector memory 13, the motion vector detected by the pixel selected in step S204 in FIG. If the motion vector of the selected pixel is a 0 vector, the assigned vector memory 15 stores a 0 vector as an initial value in advance, so that subsequent steps S222 to S224 and steps S206 to S206 of FIG. The process of S208 is skipped.

ステップS222において、画素情報演算部111は、ステップS221で取得した動きベクトルと内挿フレームの交点を算出する。   In step S222, the pixel information calculation unit 111 calculates the intersection of the motion vector acquired in step S221 and the interpolation frame.

ステップS223において、画素情報演算部111は、動きベクトルと内挿フレームの交点から割付対象画素を設定する。例えば、交点が内挿フレーム上の画素位置に一致する場合、その交点にある画素が割付対象画素に設定される。また、交点が内挿フレーム上の画素位置に一致しない場合、上述したように、内挿フレーム上の交点の近傍4画素が割付対象画素に設定される。   In step S223, the pixel information calculation unit 111 sets an allocation target pixel from the intersection of the motion vector and the interpolation frame. For example, when the intersection point coincides with the pixel position on the interpolation frame, the pixel at the intersection point is set as the allocation target pixel. Further, when the intersection does not coincide with the pixel position on the interpolation frame, as described above, four pixels near the intersection on the interpolation frame are set as the allocation target pixels.

ステップS224において、画素情報演算部111は、それぞれの割付対象画素を基準に、取得した動きベクトルで対応付けた元フレーム上の位置を算出する。例えば、割付対象画素にシフトされた動きベクトルと、元フレーム上の交点の位置が算出される。算出された元フレーム上の位置は、評価値演算部112が評価値DFDを求めるために、また、着目画素差分演算部113が輝度差分絶対値を求めるために用いられる。その後、図32のステップS205に戻り、それ以降の処理が行われる。   In step S224, the pixel information calculation unit 111 calculates a position on the original frame associated with the acquired motion vector with reference to each allocation target pixel. For example, the motion vector shifted to the allocation target pixel and the position of the intersection point on the original frame are calculated. The calculated position on the original frame is used for the evaluation value calculation unit 112 to obtain the evaluation value DFD, and for the pixel-of-interest difference calculation unit 113 to obtain the luminance difference absolute value. Thereafter, the process returns to step S205 in FIG. 32, and the subsequent processing is performed.

次に、図34のフローチャートを参照して、図32のステップS207において行われる割付ベクトル評価処理について説明する。   Next, the allocation vector evaluation process performed in step S207 of FIG. 32 will be described with reference to the flowchart of FIG.

ステップS241において、評価値演算部112は、元フレーム上の位置の情報が画素情報演算部111から供給されてきたとき、フレームt,t+1上の位置を中心としたDFD演算範囲をそれぞれ求め、ステップS242に進み、その求めたDFD演算範囲が画枠内にあるか否かを判定する。   In step S241, the evaluation value calculation unit 112 obtains DFD calculation ranges centered on the positions on the frames t and t + 1 when the position information on the original frame is supplied from the pixel information calculation unit 111. In step S242, it is determined whether or not the obtained DFD calculation range is within the image frame.

評価値演算部112は、ステップS242において、DFD演算範囲が画枠からはみ出していると判定した場合、その動きベクトルは割付対象画素に割り付ける割付候補ベクトルにはならないと判定し、処理を終了させる。   If the evaluation value calculation unit 112 determines in step S242 that the DFD calculation range extends beyond the image frame, the evaluation value calculation unit 112 determines that the motion vector is not an allocation candidate vector to be allocated to the allocation target pixel, and ends the process.

一方、ステップS242において、評価値演算部112は、DFD演算範囲が画枠内にあると判定した場合、ステップS243に進み、DFD演算範囲を用いて割付対象画素の評価値DFDを求め、求めた評価値DFDをベクトル評価部114の評価値判断部122に出力する。   On the other hand, in step S242, when the evaluation value calculation unit 112 determines that the DFD calculation range is within the image frame, the evaluation value calculation unit 112 proceeds to step S243 and obtains the evaluation value DFD of the allocation target pixel using the DFD calculation range. The evaluation value DFD is output to the evaluation value determination unit 122 of the vector evaluation unit 114.

ステップS244において、着目画素差分演算部113は、元フレーム上の位置の情報が画素情報演算部111から供給されてきたとき、割付対象画素における輝度差分絶対値dpを求め、求めた輝度差分絶対値dpをベクトル評価部114の画素差分判断部121に出力する。   In step S244, when the information on the position on the original frame is supplied from the pixel information calculation unit 111, the pixel-of-interest difference calculation unit 113 calculates the luminance difference absolute value dp in the allocation target pixel, and the calculated luminance difference absolute value dp is output to the pixel difference determination unit 121 of the vector evaluation unit 114.

ステップS245において、画素差分判断部121は、着目画素差分演算部113により求められた輝度差分絶対値dpが、所定のしきい値以下であるか否かを判定し、輝度差分絶対値dpが所定のしきい値より大きいと判定した場合、フレームt,t+1の交点がそれぞれ異なるオブジェクトに属する可能性が高いことから、その動きベクトルの信頼度が低く、割付対象画素に割り付ける割付候補ベクトルにはならないと判定し、処理を終了させる。   In step S245, the pixel difference determination unit 121 determines whether or not the luminance difference absolute value dp obtained by the target pixel difference calculation unit 113 is equal to or less than a predetermined threshold value, and the luminance difference absolute value dp is predetermined. If it is determined that the intersection of frames t and t + 1 belongs to different objects, the reliability of the motion vector is low and the allocation candidate vector to be allocated to the allocation target pixel is determined. It is determined that it should not occur, and the process is terminated.

一方、画素差分判断部121は、ステップS245において、割付対象画素の輝度差分絶対値dpが所定のしきい値以下であると判定した場合、ステップS246に進む。   On the other hand, if the pixel difference determination unit 121 determines in step S245 that the luminance difference absolute value dp of the allocation target pixel is equal to or less than a predetermined threshold value, the process proceeds to step S246.

ステップS246において、評価値判断部122は、ベクトル選択部115により保持されているDFDテーブルを参照し、評価値演算部112により求められた割付対象画素の評価値DFDが、DFDテーブルに記憶されている割付対象画素の最小評価値(いまの場合、0ベクトルの評価値DFD0)よりも小さいか否かを判定する。   In step S246, the evaluation value determination unit 122 refers to the DFD table held by the vector selection unit 115, and the evaluation value DFD of the allocation target pixel obtained by the evaluation value calculation unit 112 is stored in the DFD table. It is determined whether or not it is smaller than the minimum evaluation value of the allocation target pixel (in this case, the evaluation value DFD0 of the 0 vector).

評価値判断部122は、ステップS246において、割付対象画素の評価値DFDが最小評価値以上であると判定した場合、その動きベクトルは信頼度が高くないと判定し、処理を終了させる。   If the evaluation value determination unit 122 determines in step S246 that the evaluation value DFD of the allocation target pixel is equal to or greater than the minimum evaluation value, the evaluation value determination unit 122 determines that the motion vector is not highly reliable and ends the process.

一方、ステップS246において、割付対象画素の評価値DFDが最小評価値よりも小さいと判定した場合、評価値判断部122は、その動きベクトルは、いままで比較した動きベクトルの中で最も信頼度が高いと判定し、信頼度が高いと判定した割付対象画素の評価値DFDをベクトル選択部115に出力する。   On the other hand, when it is determined in step S246 that the evaluation value DFD of the allocation target pixel is smaller than the minimum evaluation value, the evaluation value determination unit 122 has the highest reliability among the motion vectors compared so far. The evaluation value DFD of the allocation target pixel that is determined to be high and determined to have high reliability is output to the vector selection unit 115.

ステップS247において、ベクトル選択部115は、割付フラグメモリ16に記憶されている、評価値判断部122から評価値DFDが供給されてきた割付対象画素の割付フラグを1(True)に書き換える。   In step S247, the vector selection unit 115 rewrites the allocation flag of the allocation target pixel to which the evaluation value DFD is supplied from the evaluation value determination unit 122, which is stored in the allocation flag memory 16, to 1 (True).

また、ベクトル選択部115は、ステップS248において、DFDテーブルに保持されている、割付対象画素に対応する最小評価値を、評価値判断部122により信頼度が高いと判定された評価値DFDで書き換える。   In step S248, the vector selection unit 115 rewrites the minimum evaluation value corresponding to the allocation target pixel held in the DFD table with the evaluation value DFD determined to have high reliability by the evaluation value determination unit 122. .

ステップS249において、ベクトル選択部115は、割付ベクトルメモリ15に記憶されている、割付対象画素に割り付けられている動きベクトルを、信頼度が高いと判定された評価値DFDに対応する動きベクトルで書き換える。ベクトル選択部115には、図32のステップS206において、割付対象画素とその動きベクトルが画素情報演算部111から供給されている。その後、図33のステップS207に戻り、それ以降の処理が行われる。   In step S249, the vector selection unit 115 rewrites the motion vector allocated to the allocation target pixel stored in the allocation vector memory 15 with the motion vector corresponding to the evaluation value DFD determined to have high reliability. . The vector selection unit 115 is supplied with the pixel to be allocated and its motion vector from the pixel information calculation unit 111 in step S206 of FIG. Thereafter, the process returns to step S207 in FIG. 33, and the subsequent processing is performed.

次に、動きベクトルの補償について説明する。   Next, motion vector compensation will be described.

図35は、図1の割付補償部17の構成例を示すブロック図である。   FIG. 35 is a block diagram illustrating a configuration example of the allocation compensator 17 of FIG.

上述したように、割付補償部17においては、ベクトル割付部14により動きベクトルが割り付けられなかった内挿フレームの画素に、その周辺画素の動きベクトルを補って割り付ける処理が行われる。   As described above, the allocation compensator 17 performs a process of allocating the pixels of the interpolation frame to which the motion vector is not allocated by the vector allocator 14 with the motion vectors of the surrounding pixels being supplemented.

割付ベクトル判定部131は、割付フラグメモリ16に記憶されている割付フラグに基づいて、内挿フレームのそれぞれの画素に動きベクトルが割り付けられているか否かを判定する。また、割付ベクトル判定部131は、ベクトル補償部132を制御し、動きベクトルが割り付けられていない画素に動きベクトルを割り付けさせる。   The allocation vector determination unit 131 determines whether a motion vector is allocated to each pixel of the interpolation frame based on the allocation flag stored in the allocation flag memory 16. Also, the allocation vector determination unit 131 controls the vector compensation unit 132 to allocate a motion vector to a pixel to which no motion vector is allocated.

例えば、内挿フレームの右下の画素を基準として逆ラスタ順にそれぞれの画素が着目され、動きベクトルが割り付けられていない画素に動きベクトルが割り付けられる。   For example, each pixel is focused on in reverse raster order with the lower right pixel of the interpolation frame as a reference, and a motion vector is assigned to a pixel to which no motion vector is assigned.

ベクトル補償部132は、着目画素の周辺画素に割り付けられた動きベクトルのうち、信頼度が最も高い1つの動きベクトルを評価値DFDに基づいて選択し、選択した動きベクトルを着目画素に割り付ける。ベクトル補償部132により画素に割り付けられた動きベクトルは、その画素と対応付けて割付ベクトルメモリ15に記憶される。   The vector compensation unit 132 selects one motion vector having the highest reliability among the motion vectors assigned to the peripheral pixels of the pixel of interest based on the evaluation value DFD, and assigns the selected motion vector to the pixel of interest. The motion vector assigned to the pixel by the vector compensation unit 132 is stored in the assigned vector memory 15 in association with the pixel.

図36は、ベクトル補償部132の詳細な構成例を示すブロック図である。   FIG. 36 is a block diagram illustrating a detailed configuration example of the vector compensation unit 132.

補償処理部141は、最小評価値DFDと、最小評価値DFDの動きベクトルを候補ベクトル(以下、補償候補ベクトルともいう)として記憶するメモリ151を有している。補償処理部141は、処理の開始時、このメモリ151に、0ベクトルの評価値DFDを最小評価値として記憶させるとともに、0ベクトルを補償候補ベクトルとして記憶させる。   The compensation processing unit 141 includes a memory 151 that stores the minimum evaluation value DFD and the motion vector of the minimum evaluation value DFD as candidate vectors (hereinafter also referred to as compensation candidate vectors). The compensation processing unit 141 stores the zero vector evaluation value DFD as the minimum evaluation value and the zero vector as the compensation candidate vector in the memory 151 at the start of the processing.

また、補償処理部141は、割付フラグメモリ16を参照して、着目画素の周辺画素に割り付けられている動きベクトルを割付ベクトルメモリ15から取得し、評価値演算部142を制御して、その動きベクトルの評価値DFDを演算させる。   Further, the compensation processing unit 141 refers to the allocation flag memory 16 to acquire the motion vector allocated to the peripheral pixel of the target pixel from the allocation vector memory 15, and controls the evaluation value calculation unit 142 to perform the motion. The vector evaluation value DFD is calculated.

補償処理部141は、評価値演算部142により求められた評価値DFDが、メモリ151に記憶されている最小評価値よりも小さいか否かを判定し、演算された評価値DFDが最小評価値よりも小さいと判定した場合、メモリ151の補償候補ベクトルと最小評価値を、演算された評価値DFDとその動きベクトルに書き換え、最終的に、評価値DFDが最も小さい周辺画素の動きベクトル(補償候補ベクトル)を、着目画素の動きベクトルとして着目画素に割り付ける。このとき、補償処理部141は、動きベクトルが割り付けられた着目画素の割付フラグメモリ16の割付フラグを1(True)に書き換える。   The compensation processing unit 141 determines whether or not the evaluation value DFD obtained by the evaluation value calculation unit 142 is smaller than the minimum evaluation value stored in the memory 151, and the calculated evaluation value DFD is the minimum evaluation value. Is smaller than the compensation candidate vector and the minimum evaluation value in the memory 151, the calculated evaluation value DFD and its motion vector are rewritten, and finally the motion vector (compensation of the peripheral pixel having the smallest evaluation value DFD is obtained. (Candidate vector) is assigned to the pixel of interest as the motion vector of the pixel of interest. At this time, the compensation processing unit 141 rewrites the allocation flag of the allocation flag memory 16 of the target pixel to which the motion vector is allocated to 1 (True).

評価値演算部142は、入力されたフレームt,t+1を用いて、割付ベクトルメモリ15から取得された、周辺画素のそれぞれの動きベクトルの評価値DFDを演算し、演算した評価値DFDを補償処理部141に出力する。   The evaluation value calculation unit 142 calculates the evaluation value DFD of each motion vector of the peripheral pixels acquired from the allocation vector memory 15 using the input frames t and t + 1, and calculates the calculated evaluation value DFD. The data is output to the compensation processing unit 141.

ここで、補償処理の概念について説明する。   Here, the concept of compensation processing will be described.

図37は、動きベクトルの割付補償について説明する図である。   FIG. 37 is a diagram illustrating motion vector allocation compensation.

図37において、丸は内挿フレーム上の1つの画素を表し、画素から延びている矢印は、それぞれの画素に割り付けられている動きベクトルを表す。矢印がない画素は、その画素に動きベクトルが割り付けられていないことを表す。   In FIG. 37, a circle represents one pixel on the interpolation frame, and an arrow extending from the pixel represents a motion vector assigned to each pixel. A pixel without an arrow indicates that no motion vector is assigned to that pixel.

図37の例においては、ベクトル割付部14により動きベクトルが割り付けられなかった中央の画素Pが着目画素とされている。また、画素Pの周辺画素である、左上、上、右上、左下、右下のそれぞれの画素に割り付けられている動きベクトルV1乃至V5が補償候補ベクトルとして選択され、その中から、評価値DFDに基づいて信頼度が高いと判定された、画素Pの上に位置する画素の動きベクトルV2が割り付けられている。   In the example of FIG. 37, the central pixel P, to which no motion vector is assigned by the vector assigning unit 14, is the target pixel. Also, motion vectors V1 to V5 assigned to the upper left, upper, upper right, lower left, and lower right pixels, which are peripheral pixels of the pixel P, are selected as compensation candidate vectors. The motion vector V2 of the pixel located on the pixel P, which has been determined to have high reliability based on this, is assigned.

このように、周辺の画素に割り付けられている動きベクトルを用いて補償が行われるのは、ある画素に着目した場合、その画素の動きは、空間方向、時間方向において、周辺の画素の動きと相関が高いと考えられることに基づくものである。   As described above, the compensation is performed using the motion vectors assigned to the peripheral pixels. When attention is paid to a certain pixel, the motion of the pixel is the same as the motion of the peripheral pixel in the spatial direction and the temporal direction. This is based on the fact that the correlation is considered high.

次に、動きベクトルの割付補償の順序について説明する。   Next, the order of motion vector allocation compensation will be described.

図38は、割り付けられた動きベクトルの例を示す図である。   FIG. 38 is a diagram illustrating an example of allocated motion vectors.

図38の例においては、内挿フレーム上の5×5画素が示されており、そのうちの黒丸はベクトル割付部14により動きベクトルが割り付けられた画素を示している。すなわち、白抜きの丸が、割付補償処理において、その対象となる画素である。   In the example of FIG. 38, 5 × 5 pixels on the interpolated frame are shown, and black circles thereof indicate pixels to which motion vectors are assigned by the vector assigning unit 14. That is, a white circle is a pixel that is a target in the allocation compensation process.

例えば、動きベクトルの割付補償は、図39に示すように、内挿フレームの最も右下にある画素を基準として、逆ラスタ順に、画素が着目されて処理が進められる。   For example, as shown in FIG. 39, the motion vector allocation compensation is performed by paying attention to the pixels in reverse raster order with the pixel at the lower right of the interpolation frame as a reference.

従って、図38に示されるようにそれぞれの画素に動きベクトルが割り付けられている場合、割付補償の対象として、はじめに、下から2行目、右から2列目の位置にある画素P1着目され、その周辺の画素の動きベクトルのうち、最も信頼度の高い動きベクトルが、画素P1に割り付けられる。図38の例においては、画素P1の右下、下、左下、右、上、左上の5つの画素に割り付けられている動きベクトルが補償候補ベクトルとして選択され、そのうちの1つの動きベクトルが画素P1に割り付けられる。   Therefore, when a motion vector is assigned to each pixel as shown in FIG. 38, attention is first paid to the pixel P1 located at the second row from the bottom and the second column from the right as the assignment compensation target. Of the motion vectors of the surrounding pixels, the motion vector having the highest reliability is assigned to the pixel P1. In the example of FIG. 38, motion vectors assigned to the five pixels at the lower right, lower, lower left, right, upper, and upper left of the pixel P1 are selected as compensation candidate vectors, and one of the motion vectors is the pixel P1. Assigned.

図40は、画素P1に動きベクトルが割り付けられた状態を示す図である。   FIG. 40 is a diagram illustrating a state in which a motion vector is assigned to the pixel P1.

図40の例においては、画素P1には、その右隣の画素の動きベクトルが選択され、割り付けられている。このように、着目している画素に動きベクトルが割り付けられたとき、割付補償の対象となる着目画素が切り替えられる。   In the example of FIG. 40, the motion vector of the pixel on the right side is selected and assigned to the pixel P1. In this way, when a motion vector is assigned to the pixel of interest, the pixel of interest that is the object of assignment compensation is switched.

すなわち、着目画素は逆ラスタ順に選択されるから、画素P1の次には、図41に示されるように、動きベクトルが割り付けられていない画素として画素P1の左となりに位置する画素P2が着目画素とされ、その周辺の画素の動きベクトルのうち、最も信頼度の高い動きベクトルが画素P2に割り付けられる。図41の例においては、画素P2の右下、下、左下、右、左、右上、上の7つの画素に割り付けられている動きベクトルが補償候補ベクトルとして選択され、そのうちの1つの動きベクトルが画素P2に割り付けられる。   That is, since the pixel of interest is selected in reverse raster order, next to the pixel P1, as shown in FIG. 41, a pixel P2 positioned to the left of the pixel P1 as a pixel to which no motion vector is assigned is the pixel of interest. The motion vector having the highest reliability among the motion vectors of the surrounding pixels is assigned to the pixel P2. In the example of FIG. 41, motion vectors assigned to the seven pixels at the bottom right, bottom, bottom left, right, left, top right, and top of the pixel P2 are selected as compensation candidate vectors, and one of the motion vectors is Assigned to pixel P2.

このように、割付補償処理においては、着目画素が切り替わったときには、直前に着目されていた画素に割り付けられた動きベクトルも、いま着目している画素に割り付ける候補の動きベクトルとして選択されることになる。図41の例においては、画素P2に割り付ける候補の動きベクトルとして、直前に着目されていた画素P1に新たに割り付けられた動きベクトルも選択されている。   As described above, in the allocation compensation processing, when the target pixel is switched, the motion vector allocated to the pixel focused on immediately before is also selected as a candidate motion vector allocated to the pixel currently focused on. Become. In the example of FIG. 41, a motion vector newly assigned to the pixel P1 that has been noticed immediately before is also selected as a candidate motion vector to be assigned to the pixel P2.

以上のように、割付補償部17においては、着目画素が逆ラスタ順に選択され、動きベクトルの割付補償が行われる。この、着目画素を逆ラスタ順に選択することは次の理由に基づく。   As described above, the allocation compensation unit 17 selects the pixel of interest in reverse raster order, and performs motion vector allocation compensation. The selection of the pixel of interest in reverse raster order is based on the following reason.

図42は、ベクトル検出部12において行われる動きベクトルの検出と、それにより検出された動きベクトルの例を示す図である。   FIG. 42 is a diagram illustrating motion vector detection performed by the vector detection unit 12 and an example of a motion vector detected thereby.

上述したように、ベクトル検出部12においては、ラスタ順に画素が着目され、勾配法が用いられて動きベクトルの検出が行われる。この勾配法による演算は、図12等を参照して説明したように、着目画素の周辺画素において先に検出された動きベクトルが、他の画素の動きベクトルを求めるときにオフセットを与えるための候補とされて開始されるものであるから、ラスタ順に着目画素が切り替えられて処理が進むほど、すなわち、フレームの右下の方にある画素ほど、検出される動きベクトルは、実際のオブジェクトの動きを表し、いわば収束していくことになる。   As described above, in the vector detection unit 12, the pixels are focused on in the raster order, and the motion vector is detected using the gradient method. As described with reference to FIG. 12 and the like, the calculation by the gradient method is a candidate for giving an offset when the motion vector previously detected in the peripheral pixels of the pixel of interest obtains the motion vector of another pixel. As the process proceeds with the pixel of interest switched in raster order, that is, the pixel located at the lower right of the frame, the detected motion vector represents the actual motion of the object. In other words, it will converge.

図42の例においては、オブジェクトOが示されており、オブジェクトOから延びる矢印は、オブジェクトOに属する画素で検出された動きベクトルを表す。図42に示されるように、オブジェクトOに属する画素で検出された動きベクトルは、処理が進んだ右下の方で検出されるものほど、太線矢印Aで示される、オブジェクトOの理想的な動き(実際の動き)に近いものとなっている。   In the example of FIG. 42, an object O is shown, and an arrow extending from the object O represents a motion vector detected by pixels belonging to the object O. As shown in FIG. 42, the ideal motion of the object O, which is indicated by the thick arrow A as the motion vector detected in the pixel belonging to the object O is detected at the lower right side where the processing has progressed. It is close to (actual movement).

そこで、割付補償においては、そのように、実際の動きを最も正確に表すと考えられる1度収束した動きベクトルも割り付け候補の動きベクトルとして選択され、他の周辺画素に割り付けられている動きベクトルとの評価結果によっては、着目画素に割り付けられるように、逆ラスタ順に、着目画素が選択されて処理が進められる。仮に、割付補償もラスタ順に処理が進められるとした場合、オブジェクトの実際の動きを最も正確に表すと考えられる、右下方の画素に割り付けられている動きベクトルは、他の画素に割り付ける補償候補のベクトルとして選択されることはない。すなわち、最も正確な動きベクトルによって補償されることはない。   Therefore, in the allocation compensation, a motion vector that has converged once, which is considered to represent the actual motion most accurately, is selected as the motion vector of the allocation candidate, and motion vectors allocated to other peripheral pixels Depending on the evaluation result, the target pixel is selected and processed in reverse raster order so that it is assigned to the target pixel. If the allocation compensation is also processed in raster order, the motion vector assigned to the lower right pixel, which is considered to represent the actual motion of the object most accurately, is the compensation candidate assigned to the other pixels. It is never selected as a vector. That is, it is not compensated by the most accurate motion vector.

図43は、補償された動きベクトルの例を示す図である。図43において、オブジェクトOに属する画素から延びている点線矢印は、補償された動きベクトルを表す。   FIG. 43 is a diagram illustrating an example of the compensated motion vector. In FIG. 43, a dotted arrow extending from a pixel belonging to the object O represents a compensated motion vector.

動きベクトルの割り付け補償においては、図41を参照して説明したように、直前に割り付けられた動きベクトルも次の着目画素の割付候補の動きベクトルとされ、評価結果によっては割り付けられるから、逆ラスタ順に処理が進められることにより、収束した右下方にある動きベクトルが、図43に示されるように左上方の画素に次々と割り付けられ、いわば伝搬してくことになる。   In the motion vector allocation compensation, as described with reference to FIG. 41, the motion vector allocated immediately before is also set as the motion vector of the next candidate pixel allocation candidate, and is allocated depending on the evaluation result. As the processing proceeds in sequence, the converged motion vector at the lower right is assigned to the upper left pixel one after another as shown in FIG.

図43の例においては、オブジェクトOに属する画素に新たに補償された動きベクトルは、右下方のものから順に割り付けられたものであり、それらは、収束した動きベクトル(右下方の画素で検出時に検出された動きベクトル)に近い、もしくは同じものとなっている。   In the example of FIG. 43, the motion vectors newly compensated for the pixels belonging to the object O are assigned in order from the lower right, and these are the converged motion vectors (the lower right pixels are detected at the time of detection). The detected motion vector is close to or the same.

以上のように、動きベクトルの検出がラスタ順で進められることにより、処理対象がフレームの右下方に移行するほど、動きベクトルは収束し、反対に、割付補償が逆ラスタ順で進められることにより、収束した動きベクトルが左上方に空間的に伝搬していくことになる。図44は、このことを示す。   As described above, since the motion vector detection proceeds in the raster order, the motion vector converges as the processing target moves to the lower right of the frame, and conversely, the allocation compensation proceeds in the reverse raster order. The converged motion vector is spatially propagated to the upper left. FIG. 44 illustrates this.

このように、割付候補が逆ラスタ順で進められることにより、実際の動きを最も正確に表すと考えられる動きベクトルを、まだ動きベクトルが割り付けられていない画素に割り付けることが可能となり、ずれた動きを表す動きベクトルが同一オブジェクト内で異なる画素に割り付けられることにより、画質が劣化してしまうことを防止することができる。   In this way, the allocation candidates are advanced in reverse raster order, so that it is possible to allocate a motion vector that is considered to represent the actual motion most accurately to a pixel that has not yet been allocated a motion vector. Is assigned to different pixels in the same object, it is possible to prevent image quality from deteriorating.

なお、以上においては、割付補償処理が逆ラスタ順に進められるものとしたが、動きベクトルの検出処理が逆ラスタ順で進められる場合、割付補償処理は、検出処理と逆の、ラスタ順で進められる。すなわち、動きベクトルの検出処理と割付補償処理は、互いに逆の処理順で進められる。   In the above description, the allocation compensation process is performed in reverse raster order. However, when the motion vector detection process is performed in reverse raster order, the allocation compensation process is performed in raster order opposite to the detection process. . That is, the motion vector detection process and the allocation compensation process are performed in the reverse processing order.

次に、動きベクトルの評価について説明する。   Next, motion vector evaluation will be described.

補償候補の動きベクトルの中から実際に割り付ける動きベクトルを選択する基準となる評価値DFDは、例えば、図45乃至図47に示されるようにして求められる。   The evaluation value DFD serving as a reference for selecting a motion vector to be actually allocated from the motion vectors of the compensation candidates is obtained as shown in FIGS. 45 to 47, for example.

図45は、左側に示される着目画素Pの補償候補ベクトルの中から選択された0ベクトルS0の評価値DFDを求める例を示す図である。   FIG. 45 is a diagram illustrating an example of obtaining the evaluation value DFD of the 0 vector S0 selected from the compensation candidate vectors of the target pixel P shown on the left side.

0ベクトルS0に対する評価値DFDは、内挿フレーム上の着目画素Pを基準として、0ベクトルS0によって対応付けられるフレームtとフレームt+1上のそれぞれの交点を中心としたDFD演算範囲D1-1,D1-2を用いて、上式(1)を演算することにより求められる。   The evaluation value DFD for the zero vector S0 is based on the pixel of interest P on the interpolation frame as a reference, and the DFD calculation range D1-1 centering on the respective intersections on the frame t and the frame t + 1 associated with the zero vector S0. , D1-2 is used to calculate the above equation (1).

図46は、左側に示される着目画素Pの補償候補ベクトルの中から選択された動きベクトルVK1の評価値DFDを求める例を示す図である。   FIG. 46 is a diagram illustrating an example of obtaining the evaluation value DFD of the motion vector VK1 selected from the compensation candidate vectors of the target pixel P shown on the left side.

動きベクトルVK1に対する評価値DFDは、内挿フレーム上の着目画素Pを基準として、動きベクトルVK1によって対応付けられるフレームtとフレームt+1上のそれぞれの交点を中心としたDFD演算範囲D2-1,D2-2を用いて、上式(1)を演算することにより求められる。   The evaluation value DFD for the motion vector VK1 is based on the pixel of interest P on the interpolated frame as a reference, and the DFD calculation range D2-1 centering on each intersection on the frame t and the frame t + 1 associated with the motion vector VK1. , D2-2, and calculating the above equation (1).

図47は、左側に示される着目画素Pの補償候補ベクトルの中から選択された動きベクトルVK2の評価値DFDを求める例を示す図である。   FIG. 47 is a diagram illustrating an example of obtaining the evaluation value DFD of the motion vector VK2 selected from the compensation candidate vectors of the target pixel P shown on the left side.

動きベクトルVK2に対する評価値DFDは、内挿フレーム上の着目画素Pを基準として、動きベクトルVK2によって対応付けられるフレームtとフレームt+1上のそれぞれの交点を中心としたDFD演算範囲D3-1,D3-2を用いて、上式(1)を演算することにより求められる。   The evaluation value DFD for the motion vector VK2 is based on the pixel of interest P on the interpolation frame as a reference, and the DFD calculation range D3-1 centering on each intersection on the frame t and the frame t + 1 associated with the motion vector VK2. , D3-2 and calculating the above equation (1).

着目画素Pの周辺画素に割り付けられている他の補償候補ベクトルについても同様の処理により評価値DFDが求められ、その中で、評価値DFDが最小となる補償候補ベクトルが、着目画素Pに割り付けられる動きベクトルとして選択される。   The evaluation value DFD is obtained by the same process for other compensation candidate vectors assigned to the peripheral pixels of the pixel of interest P, and among them, the compensation candidate vector having the smallest evaluation value DFD is assigned to the pixel of interest P. Selected as a motion vector.

次に、以上のような構成を有する割付補償部17の各部の処理について説明する。   Next, processing of each unit of the allocation compensation unit 17 having the above configuration will be described.

はじめに、図48のフローチャートを参照して、割付補償部17により行われる割付補償処理の全体について説明する。この処理は、図5のステップS4において行われる処理である。   First, the entire allocation compensation processing performed by the allocation compensation unit 17 will be described with reference to the flowchart of FIG. This process is a process performed in step S4 of FIG.

ステップS301において、割付ベクトル判定部131は、内挿フレームの画素のうち、最も右下方にある画素を基準として逆ラスタ順に選択した1つの画素を着目画素とする。   In step S301, the allocation vector determination unit 131 sets one pixel selected from the pixels in the interpolation frame in reverse raster order based on the pixel located at the lower rightmost position as a target pixel.

ステップS302において、割付ベクトル判定部131は、割付フラグメモリ16に記憶されている着目画素の割付フラグが0(False)であるか否かを判定し、0(False)であると判定した場合、いま選択している着目画素には動きベクトルが割り付けられていないと認識してステップS303に進む。   In step S302, the allocation vector determination unit 131 determines whether the allocation flag of the pixel of interest stored in the allocation flag memory 16 is 0 (False), and if it is determined that it is 0 (False), Recognizing that no motion vector is assigned to the pixel of interest currently selected, the process proceeds to step S303.

ステップS303において、ベクトル補償部132はベクトル補償処理を実行する。このベクトル補償処理により、周辺画素に割り付けられた動きベクトルの中から、評価値DFDが最小となる動きベクトルが補償候補ベクトルとしてメモリ151に記憶される。ベクトル補償処理の詳細については、図49のフローチャートを参照して後述する。   In step S303, the vector compensation unit 132 executes vector compensation processing. By this vector compensation processing, a motion vector that minimizes the evaluation value DFD is stored in the memory 151 as a compensation candidate vector from among the motion vectors assigned to the peripheral pixels. Details of the vector compensation processing will be described later with reference to the flowchart of FIG.

ステップS304において、ベクトル補償部132の補償処理部141(図36)は、メモリ151に記憶されている補償候補ベクトルを、着目画素の動きベクトルとして割付ベクトルメモリ15に割り付ける。   In step S304, the compensation processing unit 141 (FIG. 36) of the vector compensation unit 132 allocates the compensation candidate vector stored in the memory 151 to the allocation vector memory 15 as the motion vector of the pixel of interest.

また、補償処理部141は、ステップS305において、割付フラグメモリ16に記憶されている着目画素の割り付けフラグを1(True)に書き換え、ステップS306に進む。   In step S305, the compensation processing unit 141 rewrites the allocation flag of the target pixel stored in the allocation flag memory 16 to 1 (True), and proceeds to step S306.

一方、ステップS302において、割付ベクトル判定部131は、着目画素の割付フラグが0(False)ではないと判定した場合、その着目画素にはすでに動きベクトルが割り付けられていると認識し、ステップS303乃至S305の処理をスキップする。   On the other hand, if the allocation vector determination unit 131 determines in step S302 that the allocation flag of the pixel of interest is not 0 (False), the allocation vector determination unit 131 recognizes that the motion vector has already been allocated to the pixel of interest, and performs steps S303 to S303. The process of S305 is skipped.

ステップS306において、割付ベクトル判定部131は、内挿フレームのすべての画素の処理を終了したか否かを判定し、すべての画素の処理を終了していないと判定した場合、ステップS301に戻り、それ以降の処理を繰り返し実行する。すなわち、1つの画素が逆ラスタ順に選択され、選択された画素を着目画素とした処理が繰り返される。   In step S306, the allocation vector determination unit 131 determines whether or not the processing for all the pixels in the interpolation frame has been completed. If it is determined that the processing for all the pixels has not been completed, the process returns to step S301. The subsequent processing is repeatedly executed. That is, one pixel is selected in reverse raster order, and the process using the selected pixel as the target pixel is repeated.

割付ベクトル判定部131は、ステップS306において、内挿フレームのすべての画素の処理を終了したと判定した場合、割付補償処理を終了させる。その後、図5のステップS4に戻り、それ以降の処理が行われる。   If the allocation vector determination unit 131 determines in step S306 that the processing for all the pixels in the interpolation frame has been completed, the allocation vector determination unit 131 ends the allocation compensation processing. Thereafter, the process returns to step S4 in FIG. 5 and the subsequent processing is performed.

次に、図49のフローチャートを参照して、図48のステップS303において行われるベクトル補償処理について説明する。   Next, the vector compensation processing performed in step S303 in FIG. 48 will be described with reference to the flowchart in FIG.

ステップS321において、ベクトル補償部132の評価値演算部142は、着目画素について、0ベクトルを用いて評価値DFD0を算出する。0ベクトルを用いた評価値DFD0の演算は、例えば、図45を参照して説明したようにして行われる。求められた評価値DFD0は補償処理部141に出力される。   In step S321, the evaluation value calculation unit 142 of the vector compensation unit 132 calculates an evaluation value DFD0 using the 0 vector for the pixel of interest. The calculation of the evaluation value DFD0 using the 0 vector is performed, for example, as described with reference to FIG. The obtained evaluation value DFD0 is output to the compensation processing unit 141.

ステップS322において、補償処理部141は、ステップS321で求められた評価値DFD0を最小評価値としてメモリ151に記憶させる。また、補償処理部141は、ステップS323において、0ベクトルを補償候補ベクトルとしてメモリ151に記憶させる。   In step S322, the compensation processing unit 141 stores the evaluation value DFD0 obtained in step S321 in the memory 151 as the minimum evaluation value. In step S323, the compensation processing unit 141 stores the 0 vector in the memory 151 as a compensation candidate vector.

ステップS324において、補償処理部141は、着目画素の周辺8画素のうちの1つの画素を選択する。例えば、周辺8画素のうち、右下の画素から逆ラスタ順に周辺画素が選択される。   In step S324, the compensation processing unit 141 selects one of the eight pixels around the pixel of interest. For example, among the eight peripheral pixels, the peripheral pixels are selected in reverse raster order from the lower right pixel.

補償処理部141は、ステップS325において、割付フラグメモリ16を参照して、ステップS324で選択した周辺画素に動きベクトルが存在するか否か、すなわち、その周辺画素の割付フラグが1(True)であるか否かを判定する。   In step S325, the compensation processing unit 141 refers to the allocation flag memory 16 to determine whether or not there is a motion vector in the peripheral pixel selected in step S324, that is, the allocation flag of the peripheral pixel is 1 (True). It is determined whether or not there is.

ステップS325において、補償処理部141は、周辺画素に動きベクトルが存在すると判定した場合、ステップS326に進み、その周辺画素の動きベクトルを割付ベクトルメモリ15から取得する。このとき、評価値演算部142に対しても、周辺画素の動きベクトルが割付ベクトルメモリ15から供給される。   In step S325, if the compensation processing unit 141 determines that a motion vector exists in the surrounding pixels, the compensation processing unit 141 proceeds to step S326, and acquires the motion vector of the surrounding pixels from the allocated vector memory 15. At this time, the motion vectors of the peripheral pixels are also supplied from the assigned vector memory 15 to the evaluation value calculation unit 142.

ステップS327において、評価値演算部142は、ステップS326で取得された周辺画素の動きベクトルの評価値DFDを算出し、求めた評価値DFDを補償処理部141に出力する。   In step S327, the evaluation value calculation unit 142 calculates the evaluation value DFD of the motion vector of the peripheral pixels acquired in step S326, and outputs the calculated evaluation value DFD to the compensation processing unit 141.

ステップS328において、補償処理部141は、評価値演算部142から供給されてきた評価値DFDが、メモリ151に記憶されている着目画素の最小評価値よりも小さいか否かを判定する。   In step S328, the compensation processing unit 141 determines whether or not the evaluation value DFD supplied from the evaluation value calculation unit 142 is smaller than the minimum evaluation value of the target pixel stored in the memory 151.

補償処理部141は、ステップS328において、新たに供給されてきた評価値DFDの方が、着目画素の最小評価値よりも小さいと判定した場合、ステップS329に進み、メモリ151に記憶されている最小評価値を、新たに供給されてきた評価値DFDに書き換える。   When the compensation processing unit 141 determines in step S328 that the newly supplied evaluation value DFD is smaller than the minimum evaluation value of the pixel of interest, the compensation processing unit 141 proceeds to step S329 and stores the minimum value stored in the memory 151. The evaluation value is rewritten to the newly supplied evaluation value DFD.

また、補償処理部141は、ステップS330において、メモリ151に記憶されている補償候補ベクトルを、ステップS326で取得された周辺画素の動きベクトルに書き換え、ステップS331に進む。   In step S330, the compensation processing unit 141 rewrites the compensation candidate vector stored in the memory 151 with the motion vector of the peripheral pixels acquired in step S326, and the process proceeds to step S331.

一方、ステップS325において、割付フラグメモリ16に記憶されている、周辺画素の割付フラグが0(False)であることから、周辺画素に割り付けられている動きベクトルがないと判定した場合、補償処理部141は、ステップS326乃至S330の処理をスキップし、ステップS331に進む。   On the other hand, when it is determined in step S325 that the allocation flag of the peripheral pixel stored in the allocation flag memory 16 is 0 (False), and it is determined that there is no motion vector allocated to the peripheral pixel, the compensation processing unit In step 141, the process of steps S326 to S330 is skipped, and the process proceeds to step S331.

また、ステップS328において、補償処理部141は、新たに求められた評価値DFDが、メモリ151に記憶されている着目画素の最小評価値以上であると判定した場合、ステップS329およびS330の処理をスキップし、ステップS331に進む。   In step S328, when the compensation processing unit 141 determines that the newly obtained evaluation value DFD is greater than or equal to the minimum evaluation value of the target pixel stored in the memory 151, the compensation processing unit 141 performs the processing in steps S329 and S330. Skip to step S331.

ステップS331において、補償処理部141は、着目画素の周辺画素のすべての処理が終了したか否かを判定し、すべての処理が終了していないと判定した場合、ステップS324に戻り、次の周辺画素を選択して、それ以降の処理を繰り返す。   In step S331, the compensation processing unit 141 determines whether or not all the processes for the peripheral pixels of the pixel of interest have been completed. If it is determined that all the processes have not been completed, the process returns to step S324, and the next peripheral A pixel is selected and the subsequent processing is repeated.

補償処理部141は、ステップS331において、着目画素の周辺画素のすべての処理が終了したと判定した場合、ベクトル補償処理を終了する。その後、図48のステップS303に戻り、それ以降の処理が行われる。   If the compensation processing unit 141 determines in step S331 that all the processing for the peripheral pixels of the pixel of interest has been completed, the compensation processing unit 141 ends the vector compensation processing. Thereafter, the process returns to step S303 in FIG. 48, and the subsequent processing is performed.

以上においては、それぞれの画素が着目画素として選択され、選択された着目画素に動きベクトルが割り付けられていない場合には、その周辺画素の動きベクトルの評価結果から選択された1つの動きベクトルが着目画素に割り付けられるように、画素毎に割付補償処理が行われる場合について説明したが、この処理は、画素単位ではなく、ブロック単位で行われるようにすることもできる。ブロック単位で割付補償処理が行われる場合、1つのブロックに含まれる全ての画素には、そのブロックに対して割り付けられた同じ動きベクトルが割り付けられる。   In the above, when each pixel is selected as the target pixel and no motion vector is assigned to the selected target pixel, one motion vector selected from the evaluation result of the motion vectors of the surrounding pixels is the target. Although the case where the allocation compensation process is performed for each pixel so as to be allocated to the pixel has been described, this process may be performed not on a pixel basis but on a block basis. When the allocation compensation processing is performed in units of blocks, the same motion vector allocated to the block is allocated to all the pixels included in one block.

ここで、図50のフローチャートを参照して、ブロック単位で行われる割付補償処理の全体について説明する。すなわち、この処理は、画素単位で行われる図48の処理に対応する処理である。   Here, the entire allocation compensation process performed in units of blocks will be described with reference to the flowchart of FIG. That is, this process is a process corresponding to the process of FIG. 48 performed in units of pixels.

割付ベクトル判定部131は、ステップS341において、内挿フレームをm×n画素毎に分けたブロックのうち、最も右下方にあるブロックを基準として逆ラスタ順に選択した1つのブロックを着目ブロックとする。   In step S341, the allocation vector determination unit 131 sets, as a block of interest, one block selected in reverse raster order based on the block at the lowermost right among the blocks obtained by dividing the interpolation frame for each m × n pixels.

ステップS342において、割付ベクトル判定部131は、着目ブロックを構成する画素の中に、割付フラグメモリ16に記憶されている割付フラグが0(False)である画素があるか否かを判定し、そのような画素があると判定した場合、着目ブロックを構成する画素の中に動きベクトルが存在しない画素があると認識する。   In step S342, the allocation vector determination unit 131 determines whether there is a pixel whose allocation flag stored in the allocation flag memory 16 is 0 (False) among the pixels constituting the target block. When it is determined that there is such a pixel, it is recognized that there is a pixel having no motion vector among the pixels constituting the target block.

ステップS343において、ベクトル補償部132はベクトル補償処理を実行する。このベクトル補償処理により、着目ブロックの周辺のブロック(周辺のブロックの画素)に割り付けられた動きベクトルの中から、評価値DFDが最小となる動きベクトルが補償候補ベクトルとしてメモリ151に記憶される。すなわち、ここでは、着目する対象が画素ではなくブロックとなる点を除いて、図49を参照して説明した処理と同様の処理が行われる。   In step S343, the vector compensation unit 132 executes vector compensation processing. By this vector compensation processing, a motion vector having the smallest evaluation value DFD is stored in the memory 151 as a compensation candidate vector from among the motion vectors assigned to the peripheral block (pixels of the peripheral block) of the target block. That is, here, the same processing as that described with reference to FIG. 49 is performed except that the target of interest is not a pixel but a block.

ステップS344において、ベクトル補償部132の補償処理部141は、着目ブロックを構成する画素の中から1つの画素を着目画素として選択し、割付フラグメモリ16に記憶されている、その着目画素の割付フラグが0(False)であるか否かを判定する。   In step S344, the compensation processing unit 141 of the vector compensation unit 132 selects one pixel from among the pixels constituting the target block as the target pixel, and the allocation flag of the target pixel stored in the allocation flag memory 16 is stored. Is determined to be 0 (False).

補償処理部141は、ステップS344において、着目画素の割付フラグが0(False)であると判定した場合、ステップS345に進み、メモリ151に記憶されている補償候補ベクトルを、着目画素の動きベクトルとして割付ベクトルメモリ15に割り付ける。   If the compensation processing unit 141 determines in step S344 that the allocation flag of the pixel of interest is 0 (False), the compensation processing unit 141 proceeds to step S345 and uses the compensation candidate vector stored in the memory 151 as the motion vector of the pixel of interest. Allocates to the allocation vector memory 15.

また、補償処理部141は、ステップS346において、割付フラグメモリ16に記憶されている着目画素の割り付けフラグを1(True)に書き換え、ステップS347に進む。   In step S346, the compensation processing unit 141 rewrites the allocation flag of the pixel of interest stored in the allocation flag memory 16 to 1 (True), and proceeds to step S347.

一方、ステップS344において、割付ベクトル判定部131は、着目画素の割付フラグが0(False)ではないと判定した場合、その着目画素にはすでに動きベクトルが割り付けられていると認識し、ステップS345,S346の処理をスキップする。   On the other hand, if the allocation vector determination unit 131 determines in step S344 that the allocation flag of the target pixel is not 0 (False), the allocation vector determination unit 131 recognizes that a motion vector has already been allocated to the target pixel, and step S345, The process of S346 is skipped.

補償処理部141は、ステップS347において、着目ブロック内のすべての画素の処理を終了したか否かを判定し、すべての画素の処理を終了していないと判定した場合、ステップS348に進む。   In step S347, the compensation processing unit 141 determines whether or not the processing for all the pixels in the target block has been completed. If it is determined that the processing for all the pixels has not been completed, the compensation processing unit 141 proceeds to step S348.

ステップS348において、補償処理部141は、着目ブロックを構成する画素のうちの、まだ着目していない画素を着目画素として選択し、ステップS344以降の処理を繰り返す。   In step S348, the compensation processing unit 141 selects a pixel that has not been focused yet among the pixels constituting the focused block as the focused pixel, and repeats the processing from step S344 onward.

一方、ステップS342において、着目ブロックを構成する画素の中に、割付フラグメモリ16に記憶されている割付フラグが0(False)である画素がないと判定された場合、または、ステップS347において、着目ブロックのすべての画素の処理を終了したと判定された場合、ステップS349に進み、補償処理部141は、内挿フレームのすべてのブロックの処理を終了したか否かを判定する。   On the other hand, when it is determined in step S342 that there is no pixel whose allocation flag stored in the allocation flag memory 16 is 0 (False) among the pixels constituting the target block, or in step S347, the target If it is determined that all the pixels in the block have been processed, the process proceeds to step S349, and the compensation processing unit 141 determines whether the processing for all the blocks in the interpolation frame has been completed.

補償処理部141は、ステップS349において、すべてのブロックの処理を終了していないと判定した場合、ステップS341に戻り、逆ラスタ順に、次のブロックを着目ブロックとして選択して、それ以降の処理を実行する。   If the compensation processing unit 141 determines in step S349 that all blocks have not been processed, the compensation processing unit 141 returns to step S341, selects the next block as the target block in reverse raster order, and performs the subsequent processing. Execute.

ステップS349において、補償処理部141は、内挿フレームのすべてのブロックの処理を終了したと判定した場合、処理を終了させる。   In step S349, when the compensation processing unit 141 determines that the processing for all the blocks of the interpolation frame has been completed, the compensation processing unit 141 ends the processing.

このように、ブロック単位で割付補償処理を行うことも可能である。   In this way, it is also possible to perform allocation compensation processing in units of blocks.

次に、内挿フレームの補間について説明する。   Next, the interpolation frame interpolation will be described.

図51は、図1の画像補間部18の構成例を示すブロック図である。   FIG. 51 is a block diagram illustrating a configuration example of the image interpolation unit 18 of FIG.

上述したように、画像補間部18においては、内挿フレームに割り付けられた動きベクトルと、フレームt,t+1の画素値を用いて内挿フレームの画素値を補間生成する処理が行われる。   As described above, the image interpolation unit 18 performs a process of interpolating and generating the pixel value of the interpolation frame using the motion vector assigned to the interpolation frame and the pixel values of the frames t and t + 1.

補間制御部161は、内挿フレームの画素から選択した1つの画素に割り付けられている動きベクトルを割付ベクトルメモリ15から取得し、内挿フレームの画素を基準として、取得した動きベクトルで対応付けられるフレームt上の位置を求める。また、補間制御部161は、求めたフレームt上の位置と内挿フレームの画素の位置から、それらの空間シフト量を求め、空間シフト量を空間フィルタ162−1に出力する。   The interpolation control unit 161 acquires a motion vector allocated to one pixel selected from the pixels of the interpolation frame from the allocation vector memory 15, and associates the motion vector with the acquired motion vector using the pixel of the interpolation frame as a reference. The position on the frame t is obtained. In addition, the interpolation control unit 161 obtains the spatial shift amount from the obtained position on the frame t and the pixel position of the interpolation frame, and outputs the spatial shift amount to the spatial filter 162-1.

同様に、補間制御部161は、内挿フレームの画素を基準として、取得した動きベクトルで対応付けられるフレームt+1上の位置を求める。また、補間制御部161は、求めたフレームt+1上の画素の位置と内挿フレームの画素の位置から、それらの空間シフト量を求め、空間シフト量を空間フィルタ162−2に出力する。   Similarly, the interpolation control unit 161 obtains a position on the frame t + 1 associated with the acquired motion vector with reference to the pixel of the interpolation frame. In addition, the interpolation control unit 161 obtains the spatial shift amount from the obtained pixel position on the frame t + 1 and the interpolated frame pixel position, and outputs the spatial shift amount to the spatial filter 162-2.

さらに、補間制御部161は、内挿フレームの時間位相(時刻)に基づいてフレームtとフレームt+1の間における補間重みを求め、求めた補間重みを乗算器163−1と163−2に設定する。   Furthermore, the interpolation control unit 161 obtains an interpolation weight between the frame t and the frame t + 1 based on the time phase (time) of the interpolated frame, and sends the obtained interpolation weight to the multipliers 163-1 and 163-2. Set.

例えば、内挿フレームの時刻が、時刻t+1から「k」だけ離れた時刻であり、かつ、時刻tから「1-k」だけ離れた時刻である場合(内挿フレームが時刻tと時刻t+1を1-k:kに内分する時刻に生成される場合)、補間制御部161は、乗算器163−1に「1-k」の補間重みを設定し、乗算器163−2に「k」の補間重みを設定する。   For example, when the time of the interpolated frame is a time separated by “k” from the time t + 1 and is a time separated by “1-k” from the time t (the interpolated frame is time t and time The interpolation control unit 161 sets the interpolation weight of “1-k” to the multiplier 163-1 and the multiplier 163-2. Is set to “k”.

空間フィルタ162−1および162−2は、例えば、キュービックフィルタなどにより構成される。空間フィルタ162−1は、フレームt上の画素の画素値と、補間制御部161から供給されてきた空間シフト量に基づいて、内挿フレームの画素に対応するフレームt上の画素の画素値を求め、求めた画素値を乗算器163−1に出力する。   Spatial filters 162-1 and 162-2 are constituted by cubic filters, for example. The spatial filter 162-1 calculates the pixel value of the pixel on the frame t corresponding to the pixel of the interpolation frame based on the pixel value of the pixel on the frame t and the spatial shift amount supplied from the interpolation control unit 161. The obtained pixel value is output to the multiplier 163-1.

空間フィルタ162−2は、フレームt+1上の画素の画素値と、補間制御部161から供給されてきた空間シフト量に基づいて、内挿フレームの画素に対応するフレームt+1上の画素の画素値を求め、求めた画素値を乗算器163−2に出力する。   The spatial filter 162-2 is a pixel on the frame t + 1 corresponding to the pixel of the interpolation frame based on the pixel value of the pixel on the frame t + 1 and the spatial shift amount supplied from the interpolation control unit 161. And the obtained pixel value is output to the multiplier 163-2.

なお、内挿フレームの画素の位置が、フレームtまたはフレームt+1において画素以下の位置である場合、その画素以下位置の画素値は、例えば、周辺の4画素との距離に基づく上述した線形補間により求められる。   In addition, when the position of the pixel of the interpolation frame is a position equal to or smaller than the pixel in the frame t or the frame t + 1, the pixel value at the position equal to or smaller than the pixel is, for example, the above-described linearity based on the distance from the surrounding four pixels. It is obtained by interpolation.

乗算器163−1は、空間フィルタ162−1から供給されてきたフレームt上の画素の画素値に、補間制御部161により設定された補間重み「1-k」を乗算し、重み付けされた画素値を加算器164に出力する。   The multiplier 163-1 multiplies the pixel value of the pixel on the frame t supplied from the spatial filter 162-1 by the interpolation weight “1-k” set by the interpolation control unit 161, and weighted pixels. The value is output to the adder 164.

乗算器163−2は、空間フィルタ162−2から供給されてきたフレームt+1上の画素の画素値に、補間制御部161により設定された補間重み「k」を乗算し、重み付けされた画素値を加算器164に出力する。   The multiplier 163-2 multiplies the pixel value of the pixel on the frame t + 1 supplied from the spatial filter 162-2 by the interpolation weight “k” set by the interpolation control unit 161, and obtains a weighted pixel. The value is output to the adder 164.

加算器164は、乗算器163−1から供給されてきた画素値と、乗算器163−2から供給されてきた画素値を加算することによって内挿フレームの画素の画素値を生成し、生成した内挿フレームの画素の画素値をバッファ165に出力する。   The adder 164 generates the pixel value of the pixel of the interpolation frame by adding the pixel value supplied from the multiplier 163-1 and the pixel value supplied from the multiplier 163-2, The pixel value of the pixel in the interpolation frame is output to the buffer 165.

バッファ165は、加算器164から供給されてきた画素値に基づいて内挿フレームを生成し、生成した内挿フレームと、記憶しているフレームt+1を、予め設定されている60P信号の時間位相に応じたタイミングで出力する。バッファ165には、フレームt+1が外部から供給されており、それが記憶されている。   The buffer 165 generates an interpolated frame based on the pixel value supplied from the adder 164, and sets the generated interpolated frame and the stored frame t + 1 to a preset 60P signal time. Output at the timing according to the phase. The buffer 165 is supplied with the frame t + 1 from the outside and stores it.

次に、図52のフローチャートを参照して、以上のような構成を有する画像補間部18の補間処理について説明する。この処理は、図5のステップS5において行われる処理である。   Next, the interpolation processing of the image interpolation unit 18 having the above configuration will be described with reference to the flowchart of FIG. This process is a process performed in step S5 of FIG.

ステップS401において、補間制御部161は、内挿フレームの時間位相に基づいて、フレームtとフレームt+1の間における内挿フレームの補間重みを求め、求められた補間重みを乗算器163−1と163−2にそれぞれ設定する。   In step S401, the interpolation control unit 161 obtains the interpolation weight of the interpolation frame between the frame t and the frame t + 1 based on the time phase of the interpolation frame, and uses the obtained interpolation weight as the multiplier 163-1. And 163-2, respectively.

補間制御部161は、ステップS402において、内挿フレームの画素を選択する。例えば、内挿フレームの左上の画素を基準としてラスタ順に画素が選択される。   In step S402, the interpolation control unit 161 selects a pixel of the interpolation frame. For example, pixels are selected in raster order using the upper left pixel of the interpolation frame as a reference.

ステップS403において、補間制御部161は、選択した画素に割り付けられている動きベクトルを割付ベクトルメモリ15から取得し、内挿フレームの画素を基準として、取得した動きベクトルで対応付けられるフレームt上の位置を求める。また、補間制御部161は、求めたフレームt上の位置と内挿フレームの画素の位置から、それらの空間シフト量を求め、空間シフト量を空間フィルタ162−1に出力する。   In step S403, the interpolation control unit 161 acquires the motion vector allocated to the selected pixel from the allocation vector memory 15, and uses the pixel of the interpolation frame as a reference on the frame t associated with the acquired motion vector. Find the position. In addition, the interpolation control unit 161 obtains the spatial shift amount from the obtained position on the frame t and the pixel position of the interpolation frame, and outputs the spatial shift amount to the spatial filter 162-1.

同様に、補間制御部161は、内挿フレームの画素を基準として、取得した動きベクトルで対応付けられるフレームt+1上の位置を求める。また、補間制御部161は、求めたフレームt+1上の画素の位置と内挿フレームの画素の位置から、それらの空間シフト量を求め、空間シフト量を空間フィルタ162−2に出力する。   Similarly, the interpolation control unit 161 obtains a position on the frame t + 1 associated with the acquired motion vector with reference to the pixel of the interpolation frame. In addition, the interpolation control unit 161 obtains the spatial shift amount from the obtained pixel position on the frame t + 1 and the interpolated frame pixel position, and outputs the spatial shift amount to the spatial filter 162-2.

ステップS404において、空間フィルタ162−1と162−2は、フレームt,t+1上の画素の画素値と、補間制御部161から供給されてきた空間シフト量に基づいて、内挿フレームの画素に対応する各フレームの画素の画素値を求め、求めた画素値を乗算器163−1と163−2にそれぞれ出力する。   In step S <b> 404, the spatial filters 162-1 and 162-2 determine the pixels of the interpolation frame based on the pixel values of the pixels on the frames t and t + 1 and the spatial shift amount supplied from the interpolation control unit 161. Are obtained, and the obtained pixel values are output to the multipliers 163-1 and 163-2, respectively.

ステップS405において、乗算器163−1は、空間フィルタ162−1から供給されてきたフレームt上の画素の画素値に、補間制御部161により設定された補間重み「1-k」を乗算し、重み付けされた画素値を加算器164に出力する。また、乗算器163−2は、空間フィルタ162−2から供給されてきたフレームt+1上の画素の画素値に、補間制御部161により設定された補間重み「k」を乗算し、重み付けされた画素値を加算器164に出力する。   In step S405, the multiplier 163-1 multiplies the pixel value of the pixel on the frame t supplied from the spatial filter 162-1 by the interpolation weight “1-k” set by the interpolation control unit 161. The weighted pixel value is output to the adder 164. Further, the multiplier 163-2 multiplies the pixel value of the pixel on the frame t + 1 supplied from the spatial filter 162-2 by the interpolation weight “k” set by the interpolation control unit 161, and performs weighting. The obtained pixel value is output to the adder 164.

加算器164は、ステップS406において、乗算器163−1から供給されてきた画素値と、乗算器163−2から供給されてきた画素値を加算することによって内挿フレームの画素の画素値を生成し、生成した画素値をバッファ165に出力する。   In step S406, the adder 164 generates the pixel value of the pixel of the interpolation frame by adding the pixel value supplied from the multiplier 163-1 and the pixel value supplied from the multiplier 163-2. The generated pixel value is output to the buffer 165.

補間制御部161は、ステップS407において、内挿フレームのすべての画素の処理が終了したか否かを判定し、すべての画素の処理が終了していないと判定した場合、ステップS402に戻り、それ以降の処理を繰り返す。   In step S407, the interpolation control unit 161 determines whether or not all the pixels in the interpolation frame have been processed. If the interpolation control unit 161 determines that all the pixels have not been processed, the process returns to step S402. The subsequent processing is repeated.

また、補間制御部161は、ステップS407において、内挿フレームのすべての画素の処理が終了したと判定した場合、画像補間処理を終了させる。その後、図5のステップS5に戻り、それ以降の処理が行われる。   If the interpolation control unit 161 determines in step S407 that all the pixels in the interpolation frame have been processed, the interpolation control unit 161 ends the image interpolation process. Thereafter, the process returns to step S5 in FIG. 5 and the subsequent processing is performed.

以上のような、動きベクトルの検出処理、割付処理、割付補償処理、および補間処理からなる一連の処理により、24P−60Pのフレーム周波数変換が信号処理装置1において実現される。   24P-60P frame frequency conversion is realized in the signal processing apparatus 1 by the series of processes including the motion vector detection process, the allocation process, the allocation compensation process, and the interpolation process.

以上においては、検出結果としての動きベクトルを選択する場合、内挿フレームの画素に割り付ける動きベクトルを選択する場合、および、補償する動きベクトルを選択する場合等のそれぞれの場合において、式(1)で求められる評価値DFDが用いられて動きベクトルの評価が行われるものとしたが、この評価値DFDは、式(1)から分かるように異なるフレームのある範囲における輝度値の差分の絶対値和であることから、評価値DFDを算出する対象となる範囲が、例えば、輝度値の変化の少ない平坦部に設定されたとき、その差分の絶対値和を正確に求めることができず、そのように正確さを欠く評価値DFDからは、より適した動きベクトルを選択することができないおそれがある。この、適した動きベクトルを選択することができないということは、結果として、生成される画像(フレーム)に破綻を生じさせることにつながることになる。   In the above, in each case of selecting a motion vector as a detection result, selecting a motion vector to be assigned to a pixel of an interpolation frame, selecting a motion vector to be compensated, etc., the expression (1) The evaluation value DFD obtained in step (3) is used to evaluate the motion vector. This evaluation value DFD is the sum of absolute values of differences in luminance values in a certain range of different frames as can be seen from equation (1). Therefore, when the range for which the evaluation value DFD is calculated is set, for example, in a flat part where the change in luminance value is small, the absolute value sum of the difference cannot be obtained accurately, and so Therefore, there is a possibility that a more suitable motion vector cannot be selected from the evaluation value DFD lacking accuracy. This failure to select a suitable motion vector results in a failure of the generated image (frame).

従って、平坦部などの輝度値の変化の少ない範囲を対象とした場合であっても差分を正確に表すことのできる評価値である偏差DFD(vDFD)が、動きベクトルの評価の際に用いられるようにしてもよい。この偏差DFDは、例えば2×2画素からなる着目ブロックの平均輝度値をオフセットとして対象範囲内の各画素の輝度値から差し引き、DC成分をカットしたものの差分の絶対値和であり、下式(13)により求められる。   Therefore, the deviation DFD (vDFD), which is an evaluation value that can accurately represent the difference even when the range where the luminance value changes little, such as a flat portion, is used, is used when evaluating the motion vector. You may do it. This deviation DFD is, for example, an absolute value sum of differences obtained by subtracting the DC component from the luminance value of each pixel in the target range using the average luminance value of the block of interest consisting of 2 × 2 pixels as an offset. 13).

Figure 0004655215
Figure 0004655215

ここで、m×nは偏差DFDを求める対象範囲である。また、Pavet+1,Pavetは対象範囲の画素の平均輝度値、Pt+1(x,y),Pt(x,y)は対象領域内の各画素の輝度値、Pmint+1,Pmintは対象領域内の最小輝度値である。 Here, m × n is a target range for obtaining the deviation DFD. Pave t + 1 and Pave t are average luminance values of pixels in the target range, P t + 1 (x, y) and P t (x, y) are luminance values of pixels in the target region, and Pmin t + 1, Pmin t is the minimum luminance value in the region of interest.

DC成分をカットした場合、輝度値の差を高い精度で検出することができるから、式(13)で求められるような偏差DFDが用いられることにより、平坦部などに演算範囲が設定されたときであっても動きベクトルの正しい評価を行うことが可能となる。   When the DC component is cut, the difference in luminance value can be detected with high accuracy. Therefore, when the calculation range is set in a flat portion or the like by using the deviation DFD as calculated by the equation (13) Even so, it is possible to correctly evaluate the motion vector.

また、偏差DFDを用いた動きベクトルの評価が、式(1)で求められる評価値DFDを用いた評価に加えて行われることにより、双方の評価で正しいと判定されてはじめて動きベクトルが選択されることになり、より正確な動きベクトルを選択することができる。   In addition, the evaluation of the motion vector using the deviation DFD is performed in addition to the evaluation using the evaluation value DFD obtained by Expression (1), so that the motion vector is selected only when it is determined to be correct in both evaluations. Thus, a more accurate motion vector can be selected.

なお、偏差DFDに替えて、下式(14)で求められるオフセット付きDFD(oDFD)が用いられ、それにより動きベクトルの評価が行われるようにしてもよい。   Instead of the deviation DFD, a DFD with an offset (oDFD) obtained by the following equation (14) may be used, and the motion vector may be evaluated accordingly.

Figure 0004655215
Figure 0004655215

ここで、図53のフローチャートを参照して、以上のような偏差DFDを用いて動きベクトルの評価を行い、動きベクトルを補償する処理について説明する。この処理は、図49の処理に対応するものである。   Here, with reference to the flowchart of FIG. 53, a process for evaluating a motion vector using the above deviation DFD and compensating the motion vector will be described. This process corresponds to the process of FIG.

ステップS501において、ベクトル補償部132の評価値演算部142は、着目画素について、0ベクトルを用いて式(1)から評価値DFD_zrを算出する。求められた評価値DFD_zrは補償処理部141に出力される。   In step S501, the evaluation value calculation unit 142 of the vector compensation unit 132 calculates an evaluation value DFD_zr from Expression (1) using the 0 vector for the pixel of interest. The obtained evaluation value DFD_zr is output to the compensation processing unit 141.

ステップS502において、補償処理部141は、ステップS501で求められた評価値DFD_zrを最小評価値minDFDとしてメモリ151に記憶させる。   In step S502, the compensation processing unit 141 stores the evaluation value DFD_zr obtained in step S501 in the memory 151 as the minimum evaluation value minDFD.

ステップS503において、ベクトル補償部132の評価値演算部142は、着目画素について、0ベクトルを用いて式(13)から偏差DFD(vDFD_zr)を算出する。求められた偏差DFD(vDFD_zr)も補償処理部141に出力される。   In step S503, the evaluation value calculation unit 142 of the vector compensation unit 132 calculates a deviation DFD (vDFD_zr) from the equation (13) using the 0 vector for the pixel of interest. The obtained deviation DFD (vDFD_zr) is also output to the compensation processing unit 141.

ステップS504において、補償処理部141は、0ベクトルを補償候補ベクトルとしてメモリ151に記憶させる。   In step S504, the compensation processing unit 141 stores the 0 vector in the memory 151 as a compensation candidate vector.

ステップS505において、補償処理部141は、着目画素の周辺8画素のうちの1つの画素を選択する。例えば、周辺8画素のうち、右下の画素から逆ラスタ順に周辺画素が選択される。   In step S <b> 505, the compensation processing unit 141 selects one pixel among the eight pixels around the pixel of interest. For example, among the eight peripheral pixels, the peripheral pixels are selected in reverse raster order from the lower right pixel.

補償処理部141は、ステップS506において、割付フラグメモリ16を参照して、ステップS505で選択した周辺画素に動きベクトルが存在するか否か、すなわち、その周辺画素の割付フラグが1(True)であるか否かを判定する。   In step S506, the compensation processing unit 141 refers to the allocation flag memory 16 to determine whether or not a motion vector exists in the peripheral pixel selected in step S505, that is, the allocation flag of the peripheral pixel is 1 (True). It is determined whether or not there is.

ステップS506において、補償処理部141は、周辺画素に動きベクトルが存在すると判定した場合、ステップS507に進み、割付ベクトルメモリ15から、その周辺画素の動きベクトルを取得する。このとき、評価値演算部142に対しても、周辺画素の動きベクトルが割付ベクトルメモリ15から供給される。   In step S506, if the compensation processing unit 141 determines that a motion vector exists in the surrounding pixels, the compensation processing unit 141 proceeds to step S507, and acquires the motion vector of the surrounding pixels from the allocation vector memory 15. At this time, the motion vectors of the peripheral pixels are also supplied from the assigned vector memory 15 to the evaluation value calculation unit 142.

ステップS508において、評価値演算部142は、ステップS507で取得された動きベクトルを用いて式(13)から偏差DFD(vDFD_tmp)を算出する。求められた偏差DFD(vDFD_tmp)は補償処理部141に出力される。   In step S508, the evaluation value calculation unit 142 calculates a deviation DFD (vDFD_tmp) from equation (13) using the motion vector acquired in step S507. The obtained deviation DFD (vDFD_tmp) is output to the compensation processing unit 141.

補償処理部141は、ステップS509において、評価値演算部142から供給されてきた偏差DFD(vDFD_tmp)が、メモリ151に記憶されている、ステップS503で求められた偏差DFD(vDFD_zr)に所定のパラメータである値TH_cmpを加算したものより小さいか否かを判定する。   In step S509, the compensation processing unit 141 stores the deviation DFD (vDFD_tmp) supplied from the evaluation value calculation unit 142 in the memory 151. The deviation DFD (vDFD_zr) obtained in step S503 is a predetermined parameter. It is determined whether or not it is smaller than the sum of the value TH_cmp.

ステップS509において、補償処理部141は、偏差DFD(vDFD_tmp)が、偏差DFD(vDFD_zr)に値TH_cmpを加算したものより小さいと判定した場合、ステップS510に進み、ステップS507で取得された動きベクトルを用いて式(1)から評価値DFD_tmpを算出する。求められた評価値DFD_tmpは補償処理部141に出力される。   In step S509, when the compensation processing unit 141 determines that the deviation DFD (vDFD_tmp) is smaller than the deviation DFD (vDFD_zr) added with the value TH_cmp, the process proceeds to step S510, and the motion vector acquired in step S507 is obtained. The evaluation value DFD_tmp is calculated from the equation (1). The obtained evaluation value DFD_tmp is output to the compensation processing unit 141.

ステップS511において、補償処理部141は、ステップS510で算出された評価値DFD_tmpが、メモリ151に記憶されている着目画素の最小評価値minDFDより小さいか否かを判定する。   In step S511, the compensation processing unit 141 determines whether or not the evaluation value DFD_tmp calculated in step S510 is smaller than the minimum evaluation value minDFD of the target pixel stored in the memory 151.

補償処理部141は、ステップS511において、評価値DFD_tmpが最小評価値minDFDより小さいと判定した場合、ステップS512に進み、メモリ151に記憶されている最小評価値minDFDを、動きベクトルを用いて求められた評価値DFD_tmpに書き換える。   If the compensation processing unit 141 determines in step S511 that the evaluation value DFD_tmp is smaller than the minimum evaluation value minDFD, the compensation processing unit 141 proceeds to step S512, and the minimum evaluation value minDFD stored in the memory 151 is obtained using the motion vector. The evaluation value is rewritten to DFD_tmp.

また、補償処理部141は、ステップS513において、メモリ151に記憶されている補償候補ベクトルを、ステップS507で取得された動きベクトルに書き換え、ステップS514に進む。   In step S513, the compensation processing unit 141 rewrites the compensation candidate vector stored in the memory 151 with the motion vector acquired in step S507, and proceeds to step S514.

一方、ステップS506において、周辺画素の割付フラグが0(False)であることから、周辺画素に割り付けられている動きベクトルがないと判定した場合、補償処理部141は、ステップS507乃至S513の処理をスキップし、ステップS514に進む。   On the other hand, if the allocation flag of the surrounding pixels is 0 (False) in step S506, if it is determined that there is no motion vector allocated to the surrounding pixels, the compensation processing unit 141 performs the processing of steps S507 to S513. Skip to step S514.

また、ステップS511において、補償処理部141は、評価値DFD_tmpが、メモリ151に記憶されている最小評価値minDFD以上であると判定した場合、ステップS512,S513の処理をスキップし、ステップS514に進む。   In step S511, when the compensation processing unit 141 determines that the evaluation value DFD_tmp is equal to or greater than the minimum evaluation value minDFD stored in the memory 151, the processing of steps S512 and S513 is skipped, and the process proceeds to step S514. .

ステップS514において、補償処理部141は、着目画素の周辺画素のすべての処理が終了したか否かを判定し、すべての処理が終了していないと判定した場合、ステップS505に戻り、次の周辺画素を選択して、それ以降の処理を繰り返す。   In step S514, the compensation processing unit 141 determines whether or not all the processes for the peripheral pixels of the target pixel have been completed, and if it is determined that all the processes have not been completed, the process returns to step S505, and the next peripheral A pixel is selected and the subsequent processing is repeated.

また、ステップS509において、補償処理部141は、偏差DFD(vDFD_tmp)が、偏差DFD(vDFD_zr)に値TH_cmpを加算したもの以上であると判定した場合も同様に、ステップS505に戻り、それ以降の処理を繰り返す。   Also, in step S509, when the compensation processing unit 141 determines that the deviation DFD (vDFD_tmp) is equal to or greater than the value obtained by adding the value TH_cmp to the deviation DFD (vDFD_zr), the process returns to step S505 in the same manner. Repeat the process.

補償処理部141は、ステップS514において、着目画素の周辺画素のすべての処理が終了したと判定した場合、ベクトル補償処理を終了する。その後、図48のステップS303に戻り、それ以降の処理が行われる。   If the compensation processing unit 141 determines in step S514 that all the processing for the peripheral pixels of the target pixel has been completed, the compensation processing unit 141 ends the vector compensation processing. Thereafter, the process returns to step S303 in FIG. 48, and the subsequent processing is performed.

以上のように、動きベクトルの評価が、偏差DFDと、式(1)より求められる評価値DFDとの2つの基準によって行われることにより、2つの基準を満たす、より正確な動きベクトルで補償することが可能となる。   As described above, the motion vector is evaluated based on the two criteria of the deviation DFD and the evaluation value DFD obtained from Expression (1), so that the motion vector is compensated with a more accurate motion vector satisfying the two criteria. It becomes possible.

なお、上述したように、偏差DFDを用いた動きベクトルの評価は、動きベクトルの補償のとき以外のときにも用いることができる。   Note that, as described above, the evaluation of the motion vector using the deviation DFD can be used at times other than the time of motion vector compensation.

次に、図54のフローチャートを参照して、偏差DFDを用いて動きベクトルの評価を行い、初期ベクトルを選択する処理について説明する。この処理は、図22の処理に対応するものである。なお、ここでは、処理の開始時、初期候補ベクトルとして0ベクトルが設定されるものとする(図22のステップS36以降の処理に対応する)。   Next, with reference to the flowchart of FIG. 54, a process for evaluating a motion vector using the deviation DFD and selecting an initial vector will be described. This process corresponds to the process of FIG. Here, it is assumed that a zero vector is set as an initial candidate vector at the start of processing (corresponding to the processing after step S36 in FIG. 22).

ステップS521において、初期ベクトル選択部31の評価値演算部55(図7)は、着目ブロックについて、0ベクトルを用いて式(1)から評価値DFD_zrを算出する。求められた評価値DFD_zrは評価値比較部56に出力される。   In step S521, the evaluation value calculation unit 55 (FIG. 7) of the initial vector selection unit 31 calculates the evaluation value DFD_zr from Expression (1) using the 0 vector for the block of interest. The obtained evaluation value DFD_zr is output to the evaluation value comparison unit 56.

ステップS522において、評価値比較部56は、ステップS521で求められた評価値DFD_zrを最小評価値minDFDとして最適候補格納用レジスタ57に記憶させる。   In step S522, the evaluation value comparison unit 56 stores the evaluation value DFD_zr obtained in step S521 in the optimum candidate storage register 57 as the minimum evaluation value minDFD.

ステップS523において、評価値演算部55は、着目ブロックについて、0ベクトルを用いて式(13)から偏差DFD(vDFD_zr)を算出する。求められた偏差DFD(vDFD_zr)も評価値比較部56に出力される。   In step S523, the evaluation value calculation unit 55 calculates the deviation DFD (vDFD_zr) from Expression (13) using the 0 vector for the block of interest. The obtained deviation DFD (vDFD_zr) is also output to the evaluation value comparison unit 56.

ステップS524において、評価値比較部56は、0ベクトルを初期候補ベクトルとして最適候補格納用レジスタ57に記憶させる。   In step S524, the evaluation value comparison unit 56 stores the zero vector in the optimum candidate storage register 57 as an initial candidate vector.

ステップS525において、評価値演算部55は、周辺画素のうちの1つの画素を選択する。   In step S525, the evaluation value calculator 55 selects one of the peripheral pixels.

評価値演算部55は、ステップS526において、ステップS525で選択した周辺画素に動きベクトルが存在するか否かを判定する。   In step S526, the evaluation value calculator 55 determines whether or not a motion vector exists in the peripheral pixel selected in step S525.

ステップS526において、評価値演算部55は、周辺画素に動きベクトルが存在すると判定した場合、ステップS527に進み、その周辺画素の動きベクトルを取得する。例えば、検出ベクトル取得部52により検出ベクトルメモリ13から読み出された周辺画素の動きベクトルは、オフセット位置演算部54を介して評価値演算部55に出力される。   In step S526, when the evaluation value calculation unit 55 determines that there is a motion vector in the peripheral pixel, the process proceeds to step S527, and acquires the motion vector of the peripheral pixel. For example, the motion vectors of the peripheral pixels read from the detection vector memory 13 by the detection vector acquisition unit 52 are output to the evaluation value calculation unit 55 via the offset position calculation unit 54.

ステップS528において、評価値演算部55は、ステップS527で取得した動きベクトルを用いて式(13)から偏差DFD(vDFD_tmp)を算出する。求められた偏差DFD(vDFD_tmp)は評価値比較部56に出力される。   In step S528, the evaluation value calculator 55 calculates a deviation DFD (vDFD_tmp) from the equation (13) using the motion vector acquired in step S527. The obtained deviation DFD (vDFD_tmp) is output to the evaluation value comparison unit 56.

評価値比較部56は、ステップS529において、評価値演算部55から供給されてきた偏差DFD(vDFD_tmp)が、最適候補格納用レジスタ57に記憶されている、ステップS523において求められた偏差DFD(vDFD_zr)に所定のパラメータである値TH_cmpを加算したものより小さいか否かを判定する。   In step S529, the evaluation value comparison unit 56 stores the deviation DFD (vDFD_tmp) supplied from the evaluation value calculation unit 55 in the optimum candidate storage register 57. The deviation DFD (vDFD_zr) obtained in step S523. ) Is added to a value TH_cmp which is a predetermined parameter.

ステップS529において、評価値演算部55は、偏差DFD(vDFD_tmp)が、着目画素の最小評価値minDFDに値TH_cmpを加算したものより小さいと判定した場合、ステップS530に進み、ステップS527で取得された動きベクトルを用いて式(1)から評価値DFD_tmpを算出する。求められた評価値DFD_tmpは評価値比較部56に出力される。   In step S529, when the evaluation value calculation unit 55 determines that the deviation DFD (vDFD_tmp) is smaller than the minimum evaluation value minDFD of the target pixel plus the value TH_cmp, the process proceeds to step S530 and acquired in step S527. The evaluation value DFD_tmp is calculated from the equation (1) using the motion vector. The obtained evaluation value DFD_tmp is output to the evaluation value comparison unit 56.

ステップS531において、評価値比較部56は、ステップS530で算出された評価値DFD_tmpが、最適候補格納用レジスタ57に記憶されている最小評価値minDFDより小さいか否かを判定する。   In step S531, the evaluation value comparison unit 56 determines whether or not the evaluation value DFD_tmp calculated in step S530 is smaller than the minimum evaluation value minDFD stored in the optimum candidate storage register 57.

評価値比較部56は、ステップS531において、評価値DFD_tmpが最小評価値minDFDより小さいと判定した場合、ステップS532に進み、最適候補格納用レジスタ57に記憶されている最小評価値minDFDを、動きベクトルを用いて求められた評価値DFD_tmpに書き換える。   If the evaluation value comparison unit 56 determines in step S531 that the evaluation value DFD_tmp is smaller than the minimum evaluation value minDFD, the evaluation value comparison unit 56 proceeds to step S532, and uses the minimum evaluation value minDFD stored in the optimum candidate storage register 57 as the motion vector. To the evaluation value DFD_tmp obtained using.

また、評価値比較部56は、ステップS533において、最適候補格納用レジスタ57に記憶されている初期候補ベクトルを、ステップS527で取得された動きベクトルに書き換え、ステップS534に進む。   In step S533, the evaluation value comparison unit 56 rewrites the initial candidate vector stored in the optimum candidate storage register 57 with the motion vector acquired in step S527, and proceeds to step S534.

一方、ステップS526において、周辺画素に動きベクトルがないと判定した場合、評価値演算部55は、ステップS527乃至S533の処理をスキップし、ステップS534に進む。   On the other hand, if it is determined in step S526 that there is no motion vector in the surrounding pixels, the evaluation value calculation unit 55 skips the processes in steps S527 to S533 and proceeds to step S534.

また、ステップS531において、評価値比較部56は、評価値DFD_tmpが、最適候補格納用レジスタ57に記憶されている最小評価値minDFD以上であると判定した場合、ステップS532,S533の処理をスキップし、ステップS534に進む。   If the evaluation value comparison unit 56 determines in step S531 that the evaluation value DFD_tmp is greater than or equal to the minimum evaluation value minDFD stored in the optimum candidate storage register 57, the process of steps S532 and S533 is skipped. The process proceeds to step S534.

ステップS534において、評価値演算部55は、全ての候補ベクトルの処理を終了したか否かを判定し、すべての処理が終了していないと判定した場合、ステップS525に戻り、それ以降の処理を繰り返し実行する。   In step S534, the evaluation value calculation unit 55 determines whether or not all the candidate vectors have been processed. If it is determined that all the processes have not ended, the evaluation value calculation unit 55 returns to step S525 and performs the subsequent processing. Run repeatedly.

また、ステップS529において、評価値演算部55は、偏差DFD(vDFD_tmp)が、偏差DFD(vDFD_zr)に値TH_cmpを加算したもの以上であると判定した場合も同様に、ステップS525に戻り、それ以降の処理を繰り返す。   Also, in step S529, when the evaluation value calculation unit 55 determines that the deviation DFD (vDFD_tmp) is greater than or equal to the value obtained by adding the value TH_cmp to the deviation DFD (vDFD_zr), the process returns to step S525. Repeat the process.

評価値演算部55は、ステップS534において、すべての候補ベクトルの処理が終了したと判定した場合、ステップS535に進み、最適候補格納用レジスタ57に記憶されている初期候補ベクトルを初期ベクトルV0として確定し、出力させる。その後、図21のステップS22に戻り、それ以降の処理が行われる。   If the evaluation value calculation unit 55 determines in step S534 that all candidate vectors have been processed, the evaluation value calculation unit 55 proceeds to step S535 and determines the initial candidate vector stored in the optimum candidate storage register 57 as the initial vector V0. And output. Thereafter, the process returns to step S22 in FIG. 21, and the subsequent processing is performed.

以上のように、偏差DFDを用いた動きベクトルの評価は、動きベクトルの割付補償のとき以外にも採用することができる。   As described above, the evaluation of the motion vector using the deviation DFD can be employed other than in the case of motion vector allocation compensation.

上述した一連の処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、専用のハードウエアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。   The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.

図55は、上述した一連の処理をプログラムにより実行するパーソナルコンピュータの構成の例を示すブロック図である。   FIG. 55 is a block diagram showing an example of the configuration of a personal computer that executes the series of processes described above by a program.

CPU(Central Processing Unit)201は、ROM(Read Only Memory)202、または記憶部208に記憶されているプログラムに従って各種の処理を実行する。RAM(Random Access Memory)203には、CPU201が実行するプログラムやデータなどが適宜記憶される。CPU201、ROM202、およびRAM203は、バス204により相互に接続されている。   A CPU (Central Processing Unit) 201 executes various processes according to a program stored in a ROM (Read Only Memory) 202 or a storage unit 208. A RAM (Random Access Memory) 203 appropriately stores programs executed by the CPU 201 and data. The CPU 201, ROM 202, and RAM 203 are connected to each other by a bus 204.

CPU201にはまた、バス204を介して入出力インタフェース205が接続されている。入出力インタフェース205には、キーボード、マウス、マイクロホンなどよりなる入力部206、ディスプレイ、スピーカなどよりなる出力部207が接続されている。CPU201は、入力部206から入力される指令に対応して各種の処理を実行する。そして、CPU201は、処理の結果を出力部207に出力する。   An input / output interface 205 is also connected to the CPU 201 via the bus 204. Connected to the input / output interface 205 are an input unit 206 made up of a keyboard, mouse, microphone, and the like, and an output unit 207 made up of a display, a speaker, and the like. The CPU 201 executes various processes in response to commands input from the input unit 206. Then, the CPU 201 outputs the processing result to the output unit 207.

入出力インタフェース205に接続されている記憶部208は、例えばハードディスクからなり、CPU201が実行するプログラムや各種のデータを記憶する。通信部209は、インターネットやローカルエリアネットワークなどのネットワークを介して外部の装置と通信する。   A storage unit 208 connected to the input / output interface 205 includes, for example, a hard disk, and stores programs executed by the CPU 201 and various data. The communication unit 209 communicates with an external device via a network such as the Internet or a local area network.

また、通信部209を介してプログラムを取得し、記憶部208に記憶してもよい。   Further, a program may be acquired via the communication unit 209 and stored in the storage unit 208.

入出力インタフェース205に接続されているドライブ210は、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア211が装着されたとき、それらを駆動し、そこに記録されているプログラムやデータなどを取得する。取得されたプログラムやデータは、必要に応じて記憶部208に転送され、記憶される。   The drive 210 connected to the input / output interface 205 drives a removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, and drives the programs and data recorded therein. Get etc. The acquired program and data are transferred to and stored in the storage unit 208 as necessary.

コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプログラムを格納するプログラム記録媒体は、図55に示すように、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア211、または、プログラムが一時的もしくは永続的に格納されるROM202や、記憶部208を構成するハードディスクなどにより構成される。プログラム記録媒体へのプログラムの格納は、必要に応じてルータ、モデムなどのインタフェースである通信部209を介して、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の通信媒体を利用して行われる。   As shown in FIG. 55, a program recording medium that stores a program that is installed in a computer and is ready to be executed by the computer includes a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only). Memory, DVD (Digital Versatile Disc), a magneto-optical disk, a removable medium 211 that is a package medium made of a semiconductor memory, a ROM 202 in which a program is temporarily or permanently stored, or a storage unit 208 It is comprised by the hard disk etc. which comprise. The program is stored in the program recording medium using a wired or wireless communication medium such as a local area network, the Internet, or digital satellite broadcasting via a communication unit 209 that is an interface such as a router or a modem as necessary. Done.

なお、本明細書において、プログラム記録媒体に格納されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program stored in the program recording medium is not limited to the processing performed in time series in the described order, but is not necessarily performed in time series. Or the process performed separately is also included.

信号処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of a signal processing apparatus. フレームの内挿の例を示す図である。It is a figure which shows the example of the interpolation of a flame | frame. 信号処理装置において行われる一連の処理を説明する図である。It is a figure explaining a series of processes performed in a signal processor. 動きベクトルの評価値を説明する図である。It is a figure explaining the evaluation value of a motion vector. 信号処理装置のフレーム周波数変換処理について説明するフローチャートである。It is a flowchart explaining the frame frequency conversion process of a signal processing apparatus. 図1のベクトル検出部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the vector detection part of FIG. 図6の初期ベクトル選択部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the initial vector selection part of FIG. 周辺領域の例を示す図である。It is a figure which shows the example of a peripheral region. 初期ベクトルの候補ブロックの例を示す図である。It is a figure which shows the example of the candidate block of an initial vector. 図6の反復勾配法演算部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the iterative gradient method calculating part of FIG. 勾配について説明する図である。It is a figure explaining a gradient. 初期ベクトルを用いて行われる反復勾配法演算について説明する図である。It is a figure explaining the iterative gradient method calculation performed using an initial vector. 図10の有効画素判断部な構成例を示すブロック図である。It is a block diagram which shows the structural example which is an effective pixel judgment part of FIG. 動きベクトルの検出ブロックの例を示す図である。It is a figure which shows the example of the detection block of a motion vector. 検出ブロックに含まれる画素の動きの例を示す図である。It is a figure which shows the example of the motion of the pixel contained in a detection block. 演算ブロックの例を示す図である。It is a figure which shows the example of a calculation block. 図10の勾配法演算部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the gradient method calculating part of FIG. 図6のシフト初期ベクトル割付部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the shift initial vector allocation part of FIG. シフト初期ベクトルについて説明する図である。It is a figure explaining a shift initial vector. シフト初期ベクトルの割り付けの例を示す図である。It is a figure which shows the example of allocation of a shift initial vector. ベクトル検出部の動きベクトル検出処理について説明するフローチャートである。It is a flowchart explaining the motion vector detection process of a vector detection part. 図21のステップS22において行われる初期ベクトル選択処理について説明するフローチャートである。It is a flowchart explaining the initial vector selection process performed in step S22 of FIG. 図21のステップS23において行われる反復勾配法演算評価処理について説明するフローチャートである。It is a flowchart explaining the iterative gradient method calculation evaluation process performed in step S23 of FIG. 図23のステップS53において行われる有効画素判定処理について説明するフローチャートである。It is a flowchart explaining the effective pixel determination process performed in step S53 of FIG. 図23のステップS55において行われるブロック単位の勾配法演算処理について説明するフローチャートである。It is a flowchart explaining the gradient method calculation process of the block unit performed in step S55 of FIG. 図23のステップS65において行われる画素単位の反復勾配法演算処理について説明するフローチャートである。It is a flowchart explaining the iterative gradient method calculation process of the pixel unit performed in step S65 of FIG. 図21のステップS24において行われるシフト初期ベクトル割り付け処理について説明するフローチャートである。It is a flowchart explaining the shift initial vector allocation process performed in step S24 of FIG. 図1のベクトル割付部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the vector allocation part of FIG. 内挿フレームの画素の例を示す図である。It is a figure which shows the example of the pixel of an interpolation frame. 動きベクトルの評価について説明する図である。It is a figure explaining evaluation of a motion vector. 4点補間処理の概念を示す図である。It is a figure which shows the concept of a 4-point interpolation process. ベクトル割付部により行われるベクトル割付処理について説明するフローチャートである。It is a flowchart explaining the vector allocation process performed by a vector allocation part. 図32のステップS205において行われる画素位置演算処理について説明するフローチャートである。FIG. 33 is a flowchart for describing pixel position calculation processing performed in step S205 of FIG. 32. FIG. 図32のステップS207において行われる割付ベクトル評価処理について説明するフローチャートである。It is a flowchart explaining the allocation vector evaluation process performed in step S207 of FIG. 図1の割付補償部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the allocation compensation part of FIG. 図35のベクトル補償部の構成例を示すブロック図である。FIG. 36 is a block diagram illustrating a configuration example of a vector compensation unit in FIG. 35. 動きベクトルの割付補償について説明する図である。It is a figure explaining the allocation compensation of a motion vector. 割り付けられた動きベクトルの例を示す図である。It is a figure which shows the example of the allocated motion vector. 割付補償処理が進められる順序の例を示す図である。It is a figure which shows the example of the order that an allocation compensation process is advanced. 動きベクトルの割り付けの例を示す図である。It is a figure which shows the example of allocation of a motion vector. 動きベクトルの割り付けの例を示す他の図である。It is another figure which shows the example of allocation of a motion vector. 動きベクトルの検出と、それにより検出された動きベクトルの例を示す図である。It is a figure which shows the example of the detection of a motion vector, and the motion vector detected by it. 動きベクトルの補償と、それにより補償された動きベクトルの例を示す図である。It is a figure which shows the example of the compensation of a motion vector, and the motion vector compensated by it. 動きベクトルの収束と伝搬について示す図である。It is a figure shown about convergence and propagation of a motion vector. 0ベクトルの評価値DFDを求める例を示す図である。It is a figure which shows the example which calculates | requires evaluation value DFD of 0 vector. 動きベクトルVK1の評価値DFDを求める例を示す図である。It is a figure which shows the example which calculates | requires evaluation value DFD of motion vector VK1. 動きベクトルVK2の評価値DFDを求める例を示す図である。It is a figure which shows the example which calculates | requires evaluation value DFD of motion vector VK2. 割付補償部の割付補償処理について説明するフローチャートである。It is a flowchart explaining the allocation compensation process of an allocation compensation part. 図48のステップS303において行われるベクトル補償処理について説明するフローチャートである。It is a flowchart explaining the vector compensation process performed in step S303 of FIG. ブロック単位の割付補償処理について説明するフローチャートである。It is a flowchart explaining the allocation compensation process of a block unit. 図1の画像補間部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image interpolation part of FIG. 画像補間部の補間処理について説明するフローチャートである。It is a flowchart explaining the interpolation process of an image interpolation part. 偏差DFDを用いて行われる動きベクトルの割付補償処理について説明するフローチャートである。It is a flowchart explaining the allocation compensation process of the motion vector performed using deviation DFD. 偏差DFDを用いて行われる初期ベクトル選択処理について説明するフローチャートである。It is a flowchart explaining the initial vector selection process performed using deviation DFD. パーソナルコンピュータの構成例を示すブロック図である。And FIG. 16 is a block diagram illustrating a configuration example of a personal computer.

符号の説明Explanation of symbols

1 信号処理装置, 11 フレームメモリ, 12 ベクトル検出部, 13 検出ベクトルメモリ, 14 ベクトル割付部, 15 割付ベクトルメモリ, 16 割付フラグメモリ, 17 割付補償部, 18 画像補間部   1 signal processing device, 11 frame memory, 12 vector detection unit, 13 detection vector memory, 14 vector allocation unit, 15 allocation vector memory, 16 allocation flag memory, 17 allocation compensation unit, 18 image interpolation unit

Claims (5)

ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域に着目し、勾配法により動きベクトルを検出する検出手段と、
生成対象となる第2のフレームに含まれるそれぞれの領域に、前記検出手段が領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付ける割付手段と
を備える画像処理装置。
Focusing on the respective regions included in the first frame in raster order or reverse raster order, detection means for detecting a motion vector by a gradient method;
The detection means pays attention to each area included in the second frame to be generated in the order opposite to the order in which the detection means pays attention to the area, and among the motion vectors assigned to the surrounding areas, An image processing apparatus comprising: an assigning unit that assigns one motion vector.
前記第1のフレームの第1の演算対象範囲と、前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルによって前記第1の演算対象範囲と対応付けられる前記第1のフレームから時間的に後の第3のフレームの第2の演算対象範囲との相関を求める演算手段をさらに備え、
前記割付手段は、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択する
請求項1に記載の画像処理装置。
The first calculation target range of the first frame and the first calculation unit associated with the first calculation target range by a motion vector assigned to a region around the region of interest in the second frame. A calculation means for obtaining a correlation with the second calculation target range of the third frame temporally after the frame of
The image processing apparatus according to claim 1, wherein the allocating unit selects one motion vector among motion vectors allocated to a peripheral region based on the correlation obtained by the computing unit.
前記第1のフレームの第1の演算対象範囲内の各画素の画素値から前記第1の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第1の演算対象範囲内の各画素の画素値と、前記第2のフレームにおいて着目した前記領域の周辺の領域に割り付けられている動きベクトルによって前記第1の演算対象範囲と対応付けられる前記第1のフレームから時間的に後の第3のフレームの第2の演算対象範囲内の各画素の画素値から前記第2の演算対象範囲内の画素の画素値の平均値を引いて得られる前記第2の演算対象範囲内の各画素の画素値とから、前記第1と第2の演算対象範囲の相関を求める演算手段をさらに備え、
前記割付手段は、前記演算手段により求められた相関に基づいて、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを選択する
請求項1に記載の画像処理装置。
Within the first calculation target range obtained by subtracting the average value of the pixel values of the pixels within the first calculation target range from the pixel value of each pixel within the first calculation target range of the first frame. After the first frame associated with the first calculation target range by the pixel value of each pixel and the motion vector assigned to the area around the area of interest in the second frame In the second calculation target range obtained by subtracting the average value of the pixel values of the pixels in the second calculation target range from the pixel values of the pixels in the second calculation target range of the third frame A calculation means for obtaining a correlation between the first and second calculation target ranges from a pixel value of each pixel;
The image processing apparatus according to claim 1, wherein the allocating unit selects one motion vector among motion vectors allocated to a peripheral region based on the correlation obtained by the computing unit.
ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域に着目し、勾配法により動きベクトルを検出し、
生成対象となる第2のフレームに含まれるそれぞれの領域に、動きベクトルの検出のときに領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付ける
ステップを含む画像処理方法。
Focusing on each region included in the first frame in raster order or reverse raster order, detecting a motion vector by the gradient method,
Focus on each area included in the second frame to be generated in the opposite order to the order of focusing on the areas when detecting the motion vector, and the motion assigned to the surrounding areas in the focused area An image processing method including a step of assigning a motion vector of one of vectors.
ラスタ順、または逆ラスタ順に第1のフレームに含まれるそれぞれの領域に着目し、勾配法により動きベクトルを検出し、
生成対象となる第2のフレームに含まれるそれぞれの領域に、動きベクトルの検出のときに領域に着目する順序と逆の順序で着目し、着目した領域に、周辺の領域に割り付けられている動きベクトルのうちの1つの動きベクトルを割り付ける
ステップを含む処理をコンピュータに実行させるプログラム。
Focusing on each region included in the first frame in raster order or reverse raster order, detecting a motion vector by the gradient method,
Focus on each area included in the second frame to be generated in the opposite order to the order of focusing on the areas when detecting the motion vector, and the motion assigned to the surrounding areas in the focused area A program that causes a computer to execute a process including a step of allocating one motion vector of vectors.
JP2005261437A 2005-09-09 2005-09-09 Image processing apparatus and method, and program Expired - Fee Related JP4655215B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005261437A JP4655215B2 (en) 2005-09-09 2005-09-09 Image processing apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005261437A JP4655215B2 (en) 2005-09-09 2005-09-09 Image processing apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2007074594A JP2007074594A (en) 2007-03-22
JP4655215B2 true JP4655215B2 (en) 2011-03-23

Family

ID=37935622

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005261437A Expired - Fee Related JP4655215B2 (en) 2005-09-09 2005-09-09 Image processing apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP4655215B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005204075A (en) * 2004-01-15 2005-07-28 Sony Corp Device and method for detecting motion vector, frame interpolation apparatus using the same, frame interpolation method using the method, program, and recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60158786A (en) * 1984-01-30 1985-08-20 Kokusai Denshin Denwa Co Ltd <Kdd> Detection system of picture moving quantity
JP3864444B2 (en) * 1995-12-20 2006-12-27 ソニー株式会社 Image signal processing apparatus and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005204075A (en) * 2004-01-15 2005-07-28 Sony Corp Device and method for detecting motion vector, frame interpolation apparatus using the same, frame interpolation method using the method, program, and recording medium

Also Published As

Publication number Publication date
JP2007074594A (en) 2007-03-22

Similar Documents

Publication Publication Date Title
JP4687994B2 (en) Image processing apparatus and method, recording medium, and program
JP4752407B2 (en) Image processing apparatus and method, program, and recording medium
KR101157053B1 (en) Image processing device and method, recording medium, and program
JP4692845B2 (en) Image processing apparatus and method, recording medium, and program
JP2007074592A (en) Image processing apparatus and method thereof, program, and recording medium
JP4655216B2 (en) Image processing apparatus and method, and program
JP4655215B2 (en) Image processing apparatus and method, and program
JP4512983B2 (en) Image processing apparatus and method, recording medium, and program
JP4655214B2 (en) Image processing apparatus and method, program, and recording medium
JP4432714B2 (en) Image processing apparatus and method, recording medium, and program
JP4650682B2 (en) Image processing apparatus and method, program, and recording medium
JP4512982B2 (en) Image processing apparatus and method, recording medium, and program
JP4512984B2 (en) Image processing apparatus and method, recording medium, and program
JP4512985B2 (en) Image processing apparatus and method, recording medium, and program
JP2007110461A (en) Image processing device and method therefor, program and recording medium
JP4655217B2 (en) Image processing apparatus and method, recording medium, and program
JP4835075B2 (en) Image processing apparatus and method, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080818

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101125

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101208

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

Free format text: PAYMENT UNTIL: 20140107

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140107

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees