JP4432714B2 - Image processing apparatus and method, recording medium, and program - Google Patents

Image processing apparatus and method, recording medium, and program Download PDF

Info

Publication number
JP4432714B2
JP4432714B2 JP2004295067A JP2004295067A JP4432714B2 JP 4432714 B2 JP4432714 B2 JP 4432714B2 JP 2004295067 A JP2004295067 A JP 2004295067A JP 2004295067 A JP2004295067 A JP 2004295067A JP 4432714 B2 JP4432714 B2 JP 4432714B2
Authority
JP
Japan
Prior art keywords
pixel
motion vector
vector
frame
difference
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
JP2004295067A
Other languages
Japanese (ja)
Other versions
JP2006109250A (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 JP2004295067A priority Critical patent/JP4432714B2/en
Publication of JP2006109250A publication Critical patent/JP2006109250A/en
Application granted granted Critical
Publication of JP4432714B2 publication Critical patent/JP4432714B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Systems (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置および方法、記録媒体、並びにプログラムに関し、特に、動きベクトルのばらつきを評価値とすることで、内挿フレームへの動きベクトル割付の精度を向上することができるようにした画像処理装置および方法、記録媒体、並びにプログラムに関する。   The present invention relates to an image processing apparatus and method, a recording medium, and a program. In particular, the accuracy of motion vector allocation to an interpolation frame can be improved by using motion vector variation as an evaluation value. The present invention relates to an image processing apparatus and method, a recording medium, and a program.

画像のフレーム周波数を変換する場合、画像処理装置は、例えば、特許文献1に示されるような勾配法を用いて、入力される元フレーム上の動きベクトルを検出し、検出された動きベクトルを、新しく内挿される内挿フレーム上の着目画素に割り付けることにより、内挿フレームの画素値を補間生成している。   When converting the frame frequency of an image, the image processing device detects a motion vector on the input original frame using a gradient method as shown in Patent Document 1, for example, The pixel value of the interpolation frame is generated by interpolation by assigning the pixel of interest on the interpolation frame to be newly inserted.

ここで、元フレーム上において、検出された動きベクトルを、内挿フレーム上の着目画素に割り付ける場合、内挿フレーム上の着目画素を通過する動きベクトルの候補が結ぶ元フレーム上の2点を中心とした一定領域において、差分絶対値和を求めて、求められた差分絶対値和を比較評価することにより、動きベクトルの候補の中から、着目画素に適切な動きベクトルを割り付けるようにしていた。   Here, when the detected motion vector is assigned to the target pixel on the interpolation frame on the original frame, the two points on the original frame connected by the motion vector candidates passing through the target pixel on the interpolation frame are centered. In the predetermined area, the sum of absolute differences is obtained, and the obtained sum of absolute differences is compared and evaluated, so that an appropriate motion vector is assigned to the pixel of interest from among motion vector candidates.

特開昭60−158786公報JP 60-158786 A

しかしながら、上述したようにして差分絶対値和を比較評価するだけでは、十分な精度を期待することができない課題があった。この結果、内挿フレームに、確からしくない動きベクトルが割り付けられてしまう課題があった。その原因としては、一定領域内で求められる複数の差分絶対値を均一に扱うこと、また、複数の差分絶対値を積算した値を評価するため、空間方向の位置関係など、それぞれの画素が個々に有する情報が失われてしまうことが考えられる。   However, there is a problem that sufficient accuracy cannot be expected only by comparing and evaluating the sum of absolute differences as described above. As a result, there is a problem that a motion vector that is not certain is assigned to the interpolation frame. The reason for this is that each pixel is individually handled, such as the positional relationship in the spatial direction, in order to uniformly handle a plurality of absolute differences obtained within a certain area, and to evaluate a value obtained by integrating the multiple absolute differences. It is conceivable that the information held in is lost.

また、比較評価に用いる画素値の空間位置が、フレーム上の画素位置と一致しない場合には、従来、目的とする空間位置の最も近傍画素の画素値、または、四捨五入などの丸め処理を行って計算した画素位置の画素値を用いて、差分絶対値和を求めていたため、求める動きベクトルの精度が、画素単位となってしまい、動きベクトルを割り付ける精度が低下してしまう課題があった。   In addition, when the spatial position of the pixel value used for the comparative evaluation does not match the pixel position on the frame, conventionally, the pixel value of the nearest pixel at the target spatial position or rounding processing such as rounding off is performed. Since the sum of absolute differences is obtained using the pixel value at the calculated pixel position, the accuracy of the motion vector to be obtained is in units of pixels, and there is a problem that the accuracy of assigning the motion vector is reduced.

さらに、差分絶対値和を比較評価するためには、複数の差分絶対値を積算しなければならず、その差分絶対和を求めるのに、処理時間がかかってしまう課題があった。   Furthermore, in order to compare and evaluate the difference absolute value sum, a plurality of difference absolute values must be integrated, and there is a problem that it takes a processing time to obtain the difference absolute sum.

本発明は、このような状況に鑑みてなされたものであり、元フレームにおいて検出された動きベクトルのうち、より確からしい動きベクトルを内挿フレームに割り付けることができるようにするものである。   The present invention has been made in view of such a situation, and makes it possible to assign a more probable motion vector to an interpolation frame among the motion vectors detected in the original frame.

本発明の画像処理装置は、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出手段と、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択手段と、着目画素選択手段により選択された着目画素毎に、差異性算出手段により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定手段と、差異性判定手段により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定手段により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付手段とを備える。 The image processing apparatus according to the present invention includes a difference calculation means for calculating a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame, a motion vector, When the intersection with the second frame matches a pixel on the second frame, the pixel that matches the intersection is selected as a target pixel to which a motion vector is assigned, and the motion vector and the second frame When the intersection point does not coincide with the pixel on the second frame, the target pixel selection unit that selects the four pixels near the intersection as the target pixel, and the difference calculation unit for each target pixel selected by the target pixel selection unit the difference of which is calculated, determines differences of whether less than the calculated difference of the other motion vectors that may be allocated to the target pixel determination And stage, the difference determination unit differences of calculated by is small and the determined target pixel than the difference of which is calculated for the other motion vector, allocating a motion vector, which is calculated by the difference determining means differences And a vector allocating unit that allocates another motion vector to a pixel of interest that has not been determined to be smaller than the difference calculated for the other motion vector .

第1のフレーム上の動きベクトルを検出する動きベクトル検出手段と、ベクトル割付手段により着目画素に割り付けられた動きベクトルに基づいて、第2のフレーム上の画素値を補間することにより生成する画素補間生成手段とをさらに備えるようにすることができる。   Motion vector detecting means for detecting a motion vector on the first frame, and pixel interpolation generated by interpolating a pixel value on the second frame based on the motion vector assigned to the pixel of interest by the vector assigning means And a generating means.

本発明の画像処理方法は、第1のフレーム上の動きベクトルを検出し、検出された動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置の画像処理方法において、画像処理装置が、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択ステップと、着目画素選択ステップの処理により選択された着目画素毎に、差異性算出ステップの処理により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定ステップと、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付ステップとを含む。 According to an image processing method of the present invention, an image processing method of an image processing apparatus that detects a motion vector on a first frame and generates a pixel value on a second frame based on the detected motion vector. A difference calculating step for calculating a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame; and the motion vector and the second frame. When the intersection point with the second frame matches the pixel on the second frame, the pixel that matches the intersection point is selected as the target pixel to which the motion vector is assigned, and the intersection point between the motion vector and the second frame is It does not match the pixel on the second frame, the four neighboring pixels of the intersection, and the target pixel selection step of selecting a pixel of interest, by the processing of the target pixel selection step Each pixel of interest is-option, differences of calculated by the processing of the difference of calculation step determines whether less than the calculated difference of the other motion vectors that may be assigned to the target pixel A difference determination step and a difference determination step are performed by assigning a motion vector to a pixel of interest determined to have a difference calculated by the difference determination processing smaller than that calculated for another motion vector. A vector allocation step of allocating another motion vector to the pixel of interest that has not been determined to be less than the difference calculated for the other motion vector .

本発明の記録媒体に記録されるプログラムは、第1のフレーム上の動きベクトルを検出し、検出された動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置のコンピュータに、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択ステップと、着目画素選択ステップの処理により選択された着目画素毎に、差異性算出ステップの処理により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定ステップと、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付ステップと
を含む処理を行わせる。
A program recorded on the recording medium of the present invention detects a motion vector on the first frame, and generates a pixel value on the second frame based on the detected motion vector. A difference calculating step for calculating a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame; and an intersection of the motion vector and the second frame If the pixel matches the pixel on the second frame, the pixel that matches the intersection is selected as the pixel of interest to which the motion vector is assigned, and the intersection of the motion vector and the second frame is the second frame. It does not match the pixel above selection, the four neighboring pixels of the intersection, and the target pixel selection step of selecting a pixel of interest, by the processing of the target pixel selection step Each pixel of interest that is, differences of calculated by the processing of the difference of calculation step, the difference determines whether less than the difference of which is calculated for the other motion vector is likely to be assigned to the pixel of interest The motion vector is allocated to the pixel of interest determined that the difference calculated by the processing of the sex determination step and the difference determination step is smaller than the difference calculated for the other motion vectors, and the difference determination step A pixel allocation step of assigning another motion vector to a pixel of interest that has not been determined that the difference calculated by the processing is smaller than the difference calculated for another motion vector is performed.

本発明のプログラムは、第1のフレーム上の動きベクトルを検出し、検出された動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置のコンピュータに、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択ステップと、着目画素選択ステップの処理により選択された着目画素毎に、差異性算出ステップの処理により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定ステップと、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付ステップとを含む処理を行わせる。 The program of the present invention detects a motion vector on the first frame and generates a pixel value on the second frame on the basis of the detected motion vector. A difference calculating step for calculating a difference between the motion vector detected in step 1 and a surrounding motion vector on the first frame of the motion vector, and an intersection of the motion vector and the second frame is a second frame. If the pixel matches the upper pixel, the pixel that matches the intersection is selected as the target pixel to which the motion vector is assigned, and the intersection of the motion vector and the second frame does not match the pixel on the second frame when the four neighboring pixels of the intersection, and the target pixel selection step of selecting a pixel of interest, each pixel of interest selected by the process of the pixel of interest selection step, Differences of calculated by the processing of the opposite sex calculating step, the difference determination step of determining whether the smaller or not than the calculated difference of the other motion vectors that may be assigned to the target pixel, the difference determination The motion vector is assigned to the pixel of interest determined that the difference calculated by the step processing is smaller than the difference calculated for other motion vectors, and the difference calculated by the processing of the difference determination step is The target pixel that has not been determined to be smaller than the difference calculated for the other motion vector is subjected to processing including a vector allocation step for assigning the other motion vector .

本発明においては、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性が算出され、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素が、動きベクトルを割り付ける対象となる着目画素として選択され、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素が、着目画素として選択される。そして、選択された着目画素毎に、算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かが判定され、算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルが割り付けられ、算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルが割り付けられるIn the present invention, the difference between the motion vector detected on the first frame and the surrounding motion vector on the first frame of the motion vector is calculated, and the intersection of the motion vector and the second frame is If the pixel matches the pixel on the second frame, the pixel matching the intersection is selected as the target pixel to which the motion vector is assigned, and the intersection of the motion vector and the second frame is If it does not coincide with the pixel, the four pixels near the intersection are selected as the target pixel. Then, for each selected pixel of interest, it is determined whether or not the calculated difference is smaller than the difference calculated for other motion vectors that may be assigned to the pixel of interest. When the motion vector is assigned to the target pixel determined to be smaller than the difference calculated for the other motion vectors, and the calculated difference is smaller than the difference calculated for the other motion vectors. Another motion vector is assigned to the pixel of interest that has not been determined .

本発明によれば、より確からしい動きベクトルを、生成されるフレームに割り付けることができる。すなわち、生成されるフレームへの動きベクトルの割付精度を、より向上することができる。また、本発明によれば、処理時間が短縮されるとともに、回路規模も縮小される。   According to the present invention, a more probable motion vector can be assigned to a generated frame. That is, it is possible to further improve the accuracy of motion vector assignment to the generated frame. Further, according to the present invention, the processing time is shortened and the circuit scale is also reduced.

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

さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定するものではない。   Further, this description does not mean that all the inventions corresponding to the specific examples described in the embodiments of the invention are described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of an invention not described in the claims of this application, that is, in the future, a divisional application will be made. Nor does it deny the existence of an invention added by amendment.

請求項1に記載の画像処理装置は、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出手段(例えば、図47の評価値演算部752)と、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択手段(例えば、図47の画素情報演算部751)と、着目画素選択手段により選択された着目画素毎に、差異性算出手段により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定手段(例えば、図47のベクトル評価部753)と、差異性判定手段により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定手段により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付手段(例えば、図47のベクトル選択部754)とを備える。 The image processing apparatus according to claim 1 is a difference calculation unit that calculates a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame of the motion vector (for example, 47, when the intersection of the motion vector and the second frame matches the pixel on the second frame, the pixel that matches the intersection is a target to which the motion vector is assigned. When the pixel of interest is selected, and the intersection of the motion vector and the second frame does not coincide with the pixel on the second frame, pixel-of-interest selection means for selecting four pixels near the intersection as the pixel of interest (for example, FIG. 47 pixel information operation unit 751) of possible to have been focused each pixel selected by the pixel of interest selection means, the difference of which is calculated by the difference of calculation means, assigned to the target pixel The difference calculated by the difference determination means (for example, the vector evaluation unit 753 in FIG. 47) for determining whether or not the difference is smaller than the difference calculated for another motion vector, A motion vector is allocated to the target pixel determined to be smaller than the difference calculated for the other motion vector, and the difference calculated by the difference determination unit is smaller than the difference calculated for the other motion vector. A vector allocating unit (for example, the vector selection unit 754 in FIG. 47) that allocates another motion vector to the pixel of interest that has not been determined .

請求項2に記載の画像処理装置は、第1のフレーム上の動きベクトルを検出する動きベクトル検出手段(例えば、図2のベクトル検出部52)と、ベクトル割付手段により着目画素に割り付けられた動きベクトルに基づいて、第2のフレーム上の画素値を補間することにより生成する画素補間生成手段(例えば、図2の画像補間部58)とをさらに備えるようにすることができる。   The image processing apparatus according to claim 2, wherein a motion vector detection unit (for example, the vector detection unit 52 in FIG. 2) that detects a motion vector on the first frame and a motion allocated to the pixel of interest by the vector allocation unit. A pixel interpolation generation unit (for example, the image interpolation unit 58 in FIG. 2) that generates by interpolating pixel values on the second frame based on the vector can be further provided.

請求項3に記載の画像処理方法は、第1のフレーム上において検出された動きベクトルと、動きベクトルの第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップ(例えば、図52のステップS781)と、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致する場合、交点と一致する画素を、動きベクトルを割り付ける対象となる着目画素として選択し、動きベクトルと第2のフレームとの交点が、第2のフレーム上の画素と一致しない場合、交点の近傍4画素を、着目画素として選択する着目画素選択ステップ(例えば、図52のステップS782)と、着目画素選択ステップの処理により選択された着目画素毎に、差異性算出ステップの処理により算出された差異性が、着目画素に割り付けられる可能性がある他の動きベクトルについて算出された差異性よりも小さいか否かを判定する差異性判定ステップ(例えば、図52のステップS785)と、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性よりも小さいと判定された着目画素に、動きベクトルを割り付け、差異性判定ステップの処理により算出された差異性が、他の動きベクトルについて算出された差異性より小さいと判定されなかった着目画素に、他の動きベクトルを割り付けるベクトル割付ステップ(例えば、図52のステップS787)とを含むThe image processing method according to claim 3 is a difference calculation step (for example, calculating a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame of the motion vector (for example, 52, and when the intersection of the motion vector and the second frame matches the pixel on the second frame, the pixel that matches the intersection is set as the target pixel to which the motion vector is assigned. If the intersection point between the motion vector and the second frame is not coincident with the pixel on the second frame, a pixel-of-interest selection step (for example, the step of FIG. 52) selects four pixels near the intersection as the pixel of interest. and S782), for each pixel of interest selected by the process of the pixel of interest selection step, the difference of which is calculated by the process of the difference of calculation step, focused image Another motion vector difference determination step of determining whether the smaller or not than the differences of calculated for that may be assigned to the (e.g., step S785 in FIG. 52) and is calculated by the processing of the difference determination step The motion vector is assigned to the pixel of interest determined to be smaller than the difference calculated for the other motion vectors, and the difference calculated by the processing of the difference determination step is determined for the other motion vectors. the calculated target pixel is not determined to be smaller than the difference of, and a vector allocation step of allocating another motion vector (e.g., step S787 in FIG. 52).

なお、請求項4に記載の記録媒体および請求項5に記載のプログラムも、上述した請求項3に記載の画像処理方法と基本的に同様の処理であるため、繰り返しになるのでその説明は省略する。   Since the recording medium according to claim 4 and the program according to claim 5 are basically the same processing as the image processing method according to claim 3 described above, the description thereof is omitted because it is repeated. To do.

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

図1は、本発明を適用した信号処理装置1の構成例を表している。信号処理装置1は、例えば、パーソナルコンピュータなどで構成される。図1において、CPU(Central Processing Unit)11は、ROM(Read Only Memory)12、または記憶部18に記憶されているプログラムに従って各種の処理を実行する。RAM(Random Access Memory)13には、CPU11が実行するプログラムやデータなどが適宜記憶される。これらのCPU11、ROM12、およびRAM13は、バス14により相互に接続されている。   FIG. 1 shows a configuration example of a signal processing apparatus 1 to which the present invention is applied. The signal processing device 1 is composed of, for example, a personal computer. In FIG. 1, a CPU (Central Processing Unit) 11 executes various processes according to a program stored in a ROM (Read Only Memory) 12 or a storage unit 18. A RAM (Random Access Memory) 13 appropriately stores programs executed by the CPU 11 and data. The CPU 11, ROM 12, and RAM 13 are connected to each other by a bus 14.

CPU11にはまた、バス14を介して入出力インタフェース15が接続されている。入出力インタフェース15には、キーボード、マウス、マイクロフォンなどよりなる入力部16、ディスプレイ、スピーカなどよりなる出力部17が接続されている。CPU11は、入力部16から入力される指令に対応して各種の処理を実行する。そして、CPU11は、処理の結果、得られた画像や音声等を出力部17に出力する。   An input / output interface 15 is also connected to the CPU 11 via the bus 14. The input / output interface 15 is connected to an input unit 16 including a keyboard, a mouse, a microphone, and the like, and an output unit 17 including a display and a speaker. The CPU 11 executes various processes in response to commands input from the input unit 16. Then, the CPU 11 outputs an image, sound, or the like obtained as a result of the processing to the output unit 17.

入出力インタフェース15に接続されている記憶部18は、例えばハードディスクなどで構成され、CPU11が実行するプログラムや各種のデータを記憶する。通信部19は、インターネット、その他のネットワークを介して外部の装置と通信する。また、通信部19を介してプログラムを取得し、記憶部18に記憶してもよい。   The storage unit 18 connected to the input / output interface 15 is composed of, for example, a hard disk, and stores programs executed by the CPU 11 and various data. The communication unit 19 communicates with an external device via the Internet or other networks. A program may be acquired via the communication unit 19 and stored in the storage unit 18.

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

なお、信号処理装置1は、例えば、テレビジョン受像機、光ディスクプレーヤなど、または、それらの信号処理部とすることもできる。   Note that the signal processing device 1 can be, for example, a television receiver, an optical disc player, or a signal processing unit thereof.

図2は、信号処理装置1を示すブロック図である。   FIG. 2 is a block diagram showing the signal processing apparatus 1.

なお、信号処理装置1の各機能をハードウェアで実現するか、ソフトウェアで実現するかは問わない。つまり、本明細書の各ブロック図は、ハードウェアのブロック図と考えても、ソフトウェアによる機能ブロック図と考えてもよい。   It does not matter whether each function of the signal processing device 1 is realized by hardware or software. That is, each block diagram in this specification may be considered as a hardware block diagram or a software functional block diagram.

図2に構成を示す信号処理装置1においては、例えば、フレーム周波数24Hzのプログレッシブ画像信号(以下、24P信号と称する)の画像が入力され、入力された画像(入力画像)が、フレーム周波数60Hzのプログレッシブ画像信号(以下、60P信号と称する)の画像に変換されて、出力される。すなわち、図2は、画像処理装置である信号処理装置の構成を示す図である。   In the signal processing device 1 having the configuration shown in FIG. 2, for example, an image of a progressive image signal (hereinafter referred to as a 24P signal) with a frame frequency of 24 Hz is input, and the input image (input image) has a frame frequency of 60 Hz. It is converted into an image of a progressive image signal (hereinafter referred to as 60P signal) and output. That is, FIG. 2 is a diagram illustrating a configuration of a signal processing device that is an image processing device.

信号処理装置1に入力された24P信号の入力画像は、フレームメモリ51、ベクトル検出部52、ベクトル割付部54、割付補償部57、および画像補間部58に供給される。フレームメモリ51は、入力画像をフレーム単位で記憶する。フレームメモリ51は、時刻t+1の入力画像の1つ前の時刻tのフレームを記憶する。フレームメモリ51に記憶される時刻tのフレームは、ベクトル検出部52、ベクトル割付部54、割付補償部57、および画像補間部58に供給される。なお、以下、フレームメモリ51上の時刻tのフレームをフレームtと称し、時刻t+1の入力画像のフレームを、フレームt+1と称する。   The input image of the 24P signal input to the signal processing device 1 is supplied to the frame memory 51, the vector detection unit 52, the vector allocation unit 54, the allocation compensation unit 57, and the image interpolation unit 58. The frame memory 51 stores input images in units of frames. The frame memory 51 stores a frame at time t one before the input image at time t + 1. The frame at time t stored in the frame memory 51 is supplied to the vector detection unit 52, the vector allocation unit 54, the allocation compensation unit 57, and the image interpolation unit 58. Hereinafter, the frame at time t on the frame memory 51 is referred to as frame t, and the frame of the input image at time t + 1 is referred to as frame t + 1.

ベクトル検出部52は、フレームメモリ51上のフレームtの着目ブロックと、入力画像のフレームt+1の対象ブロックの間で動きベクトルを検出し、検出した動きベクトルを、検出ベクトルメモリ53に記憶する。この2フレーム間の動きベクトルの検出方法には、勾配法またはブロックマッチング法などが用いられる。ベクトル検出部52の構成の詳細は、後述する。検出ベクトルメモリ53は、フレームtにおいて、ベクトル検出部52により検出された動きベクトルを記憶する。   The vector detection unit 52 detects a motion vector between the target block of the frame t on the frame memory 51 and the target block of the frame t + 1 of the input image, and stores the detected motion vector in the detection vector memory 53. As a method for detecting the motion vector between the two frames, a gradient method or a block matching method is used. Details of the configuration of the vector detection unit 52 will be described later. The detection vector memory 53 stores the motion vector detected by the vector detection unit 52 in the frame t.

ベクトル割付部54は、24P信号のフレームt上において求められた動きベクトルを、割付ベクトルメモリ55上の、補間する60P信号のフレーム(以下、60P信号のフレームは、24P信号のフレームと区別するため、内挿フレームとも称する)上の画素に割り付け、動きベクトルが割り付けられた画素の割付フラグメモリ56の割付フラグを1(True)に書き換える。ベクトル割付部54の構成の詳細は、後述する。   The vector allocation unit 54 distinguishes the motion vector obtained on the frame t of the 24P signal from the frame of the 60P signal to be interpolated in the allocation vector memory 55 (hereinafter, the frame of the 60P signal is distinguished from the frame of the 24P signal). , Which is also referred to as an interpolation frame), and the allocation flag of the allocation flag memory 56 of the pixel to which the motion vector is allocated is rewritten to 1 (True). Details of the configuration of the vector allocation unit 54 will be described later.

割付ベクトルメモリ55は、ベクトル割付部54により割り付けられた動きベクトルを、内挿フレームの各画素に対応させて記憶する。割付フラグメモリ56は、内挿フレームの画素毎に、割り付けられる動きベクトルの有無を示す割付フラグを記憶している。例えば、True(1)である割付フラグは、対応する画素に動きベクトルが割り付けられていることを示し、False(0)である割付フラグは、対応する画素に動きベクトルが割り付けられていないことを示す。   The allocation vector memory 55 stores the motion vector allocated by the vector allocation unit 54 in association with each pixel of the interpolation frame. The allocation flag memory 56 stores an allocation flag indicating the presence / absence of a motion vector to be allocated for each pixel of the interpolation frame. For example, an assignment flag of True (1) indicates that a motion vector is assigned to the corresponding pixel, and an assignment flag of False (0) indicates that a motion vector is not assigned to the corresponding pixel. Show.

割付補償部57は、割付フラグメモリ56の割付フラグを参照し、ベクトル割付部54により動きベクトルが割り付けられなかった着目画素に対して、その着目画素の周辺画素の動きベクトルを補い、割付ベクトルメモリ55の内挿フレーム上に割り付ける。このとき、割付補償部57は、動きベクトルを割り付けた着目画素の割付フラグを1(True)に書き換える。割付補償部57の構成の詳細は、後述する。   The allocation compensation unit 57 refers to the allocation flag of the allocation flag memory 56, and supplements the motion vector of the peripheral pixel of the target pixel with respect to the target pixel for which the motion vector has not been allocated by the vector allocation unit 54. Allocate on 55 interpolation frames. At this time, the allocation compensator 57 rewrites the allocation flag of the target pixel to which the motion vector is allocated to 1 (True). Details of the configuration of the allocation compensator 57 will be described later.

画像補間部58は、割付ベクトルメモリ55の内挿フレームに割り付けられた動きベクトルと、フレームtおよび次のフレームt+1の画素値を用いて、内挿フレームの画素値を補間生成する。そして、画像補間部58は、生成された内挿フレームを出力し、その次に、必要に応じて、フレームt+1を出力することにより、60P信号の画像を、図示せぬ後段に出力する。なお、以下においては、画素値を、適宜、輝度値とも称する。   The image interpolation unit 58 interpolates and generates the pixel value of the interpolation frame using the motion vector allocated to the interpolation frame in the allocation vector memory 55 and the pixel values of the frame t and the next frame t + 1. Then, the image interpolation unit 58 outputs the generated interpolated frame, and then outputs the frame t + 1 as necessary, thereby outputting the 60P signal image to a subsequent stage (not shown). In the following, the pixel value is also referred to as a luminance value as appropriate.

図3は、本発明に係る信号処理装置1における処理の原理を説明する図である。図3の例においては、点線が、信号処理装置1に入力される、時刻t,t+1,およびt+2における24P信号のフレームを表しており、実線が、入力された24P信号から信号処理装置1により、生成される時刻t,t+0.4,t+0.8,t+1.2,t+1.6,およびt+2における60P信号の内挿フレームを表している。   FIG. 3 is a diagram for explaining the principle of processing in the signal processing apparatus 1 according to the present invention. In the example of FIG. 3, a dotted line represents a frame of a 24P signal that is input to the signal processing device 1 at times t, t + 1, and t + 2, and a solid line is represented by the signal processing device 1 from the input 24P signal. , The 60P signal interpolation frames at the generated times t, t + 0.4, t + 0.8, t + 1.2, t + 1.6, and t + 2.

一般に、24P信号を、60P信号に変換するためには、5/2倍のフレームが必要になる。すなわち、2枚の24P信号の画像から5枚の60P信号の画像が生成されなければならない。このとき、生成される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信号上には存在しない画像である。したがって、信号処理装置1は、24P信号の画像が入力されると、24P信号の時刻tおよび時刻t+1の2枚のフレームから、4つの内挿フレームを生成する。したがって、信号処理装置1からは、時刻t,t+0.4,t+0.8,t+1.2,およびt+1.6の5枚のフレームからなる60P信号の画像が出力される。   Generally, in order to convert a 24P signal into a 60P signal, 5/2 times as many frames are required. That is, five 60P signal images must be generated from two 24P signal images. At this time, the generated interpolated frame of the 60P signal has a time phase of 0.0, 0.4, 0.8, 1.2, and 1 on the 24P signal in order to equalize the frame interval. 6 is arranged at a position. Among these, 4 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 do not exist on the 24P signal. It is an image. Therefore, when the image of the 24P signal is input, the signal processing device 1 generates four interpolation frames from the two frames at the time t and the time t + 1 of the 24P signal. Therefore, the signal processing apparatus 1 outputs a 60P signal image composed of five frames at times t, t + 0.4, t + 0.8, t + 1.2, and t + 1.6.

以上のようにして、信号処理装置1は、24P信号の画像から60P信号の画像に、フレーム周波数を変換する処理を実行する。   As described above, the signal processing apparatus 1 executes the process of converting the frame frequency from the 24P signal image to the 60P signal image.

なお、原理的には、上述したように、24P信号の時刻tおよび時刻t+1の2枚のフレームから、時刻t,t+0.4,t+0.8,t+1.2,およびt+1.6の5枚の60P信号のフレームが新しく生成されるが、実際には、図3の例の場合、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, as described above, from the two frames at time t and time t + 1 of the 24P signal, five frames at times t, t + 0.4, t + 0.8, t + 1.2, and t + 1.6 are obtained. A frame of 60P signal is newly generated. Actually, in the example of FIG. 3, 60P of t, t + 0.4, and t + 0.8 is based on two frames at time t and time t + 1 of the 24P signal. A frame of the signal is generated, and a frame of the 60P signal of t + 1.2, t + 1.6, and t + 2 is generated based on the two frames at the times t + 1 and t + 2 of the 24P signal.

図4は、本発明の処理をより具体的に説明する図である。図4の例においては、太線矢印は、各状態への遷移を表しており、矢印Tは、状態81乃至85における時間の経過方向を表している。また、状態81乃至85は、信号処理装置1を構成する各部への入出力時の、24P信号の時刻tのフレームt、時刻tの次の時刻t+1のフレームt+1、または、フレームtおよびフレームt+1の間に生成される60P信号の内挿フレームFの状態を概念的に表している。すなわち、実際には、例えば、状態82に示されるような動きベクトルが検出されたフレームは入力されず、フレームと動きベクトルは、別々に入力される。   FIG. 4 is a diagram for more specifically explaining the processing of the present invention. In the example of FIG. 4, a thick arrow represents a transition to each state, and an arrow T represents a time passage direction in the states 81 to 85. The states 81 to 85 are the frame t at the time t of the 24P signal, the frame t + 1 at the time t + 1 next to the time t, or the frame t and the frame t + 1 at the time of input / output to each unit constituting the signal processing device 1. The state of the interpolation frame F of the 60P signal produced | generated during is shown notionally. That is, actually, for example, a frame in which a motion vector is detected as shown in the state 82 is not input, and the frame and the motion vector are input separately.

状態81は、ベクトル検出部52に入力される、24P信号のフレームtおよびフレームt+1の状態を表している。状態81のフレームt上の黒点は、フレームt上の画素を表している。ベクトル検出部52は、状態81のフレームt上の画素が、次の時刻のフレームt+1において、どの位置に移動するかを検出し、その動きを、状態82のフレームt上に示されるように、各画素に対応する動きベクトルとして出力する。この2フレーム間の動きベクトルの検出方法には、ブロックマッチング法または勾配法などが用いられる。なお、このとき、画素に複数の動きベクトルが検出された場合、ベクトル検出部52は、各動きベクトルについて、後述する評価値を求め、その評価値に基づいて動きベクトルを選択する。   The state 81 represents the state of the frame t and the frame t + 1 of the 24P signal input to the vector detection unit 52. A black dot on the frame t in the state 81 represents a pixel on the frame t. The vector detection unit 52 detects the position where the pixel on the frame t in the state 81 moves in the frame t + 1 of the next time, and the movement is indicated as shown on the frame t in the state 82. It outputs as a motion vector corresponding to each pixel. As a method for detecting the motion vector between the two frames, a block matching method or a gradient method is used. At this time, when a plurality of motion vectors are detected in the pixel, the vector detection unit 52 obtains an evaluation value to be described later for each motion vector, and selects a motion vector based on the evaluation value.

状態82は、ベクトル割付部54に入力される、フレームtおよびフレームt+1の状態を表している。状態82において、フレームtの各画素の矢印は、ベクトル検出部52により検出された動きベクトルを表している。   A state 82 represents the state of the frame t and the frame t + 1 input to the vector allocation unit 54. In the state 82, the arrow of each pixel of the frame t represents the motion vector detected by the vector detection unit 52.

ベクトル割付部54は、状態82のフレームtの各画素に対して検出された動きベクトルを、次のフレームt+1まで延長させ、予め設定されている時間位相(例えば、図3のt+0.4)にある内挿フレームF上のどの位置を通過するかを求める。これは、フレームtおよびフレームt+1の間が一定動きであると仮定すると、動きベクトルが内挿フレームFを通過した点が、そのフレームでの画素位置となるためである。したがって、ベクトル割付部54は、この通過する動きベクトルを、状態83の内挿フレームF上の近傍4画素に割り付ける。また、このとき、内挿フレームの画素によっては、動きベクトルが存在しない場合、あるいは、複数の動きベクトルが、割付候補となりうる場合がある。後者のような場合には、ベクトル割付部54は、ベクトル検出部52と同様に、各動きベクトルについての評価値を求め、その評価値に基づいて割り付ける動きベクトルを選択する。   The vector allocating unit 54 extends the motion vector detected for each pixel of the frame t in the state 82 to the next frame t + 1 and sets it to a preset time phase (for example, t + 0.4 in FIG. 3). A position on a certain interpolation frame F is obtained. This is because, assuming that there is a constant motion between the frame t and the frame t + 1, the point where the motion vector passes through the interpolation frame F is the pixel position in that frame. Therefore, the vector allocating unit 54 allocates the passing motion vector to four neighboring pixels on the interpolation frame F in the state 83. At this time, depending on the pixel of the interpolation frame, there may be a case where no motion vector exists, or a plurality of motion vectors may be candidates for allocation. In the latter case, like the vector detection unit 52, the vector allocation unit 54 obtains an evaluation value for each motion vector and selects a motion vector to be allocated based on the evaluation value.

状態83は、割付補償部57に入力される、フレームtおよびフレームt+1、並びに動きベクトルが割り付けられた内挿フレームFの状態を表している。状態83の内挿フレームFにおいては、ベクトル割付部54により動きベクトルが割り付けられている画素と、動きベクトルが割り付けられなかった画素が示されている。   A state 83 represents the state of the frame t and the frame t + 1 and the interpolation frame F to which the motion vector is assigned, which is input to the assignment compensation unit 57. In the interpolation frame F in the state 83, the pixels to which the motion vector is assigned by the vector assigning unit 54 and the pixels to which the motion vector is not assigned are shown.

割付補償部57は、状態83の動きベクトルが割り付けられていない画素に対して、その画素の周辺画素に割り付けられている動きベクトルを用いて補う。これは、ある着目画素の近傍領域が同じ動きであるという仮定が成り立つならば、着目画素の周辺画素の動きベクトルと、その着目画素の動きベクトルは似たものであるからである。これにより、動きベクトルが割り付けられなかった画素にも、ある程度正確な動きベクトルが与えられ、状態84の内挿フレームF上のすべての画素に動きベクトルが割り付けられる。なお、この場合にも、複数の周辺画素の動きベクトルが候補として存在するため、割付補償部57は、ベクトル割付部54と同様に、各動きベクトルについての評価値を求め、その評価値に基づいて割り付ける動きベクトルを選択する。   The allocation compensation unit 57 compensates for a pixel to which a motion vector in the state 83 is not allocated by using a motion vector allocated to a peripheral pixel of the pixel. This is because the motion vector of the peripheral pixel of the pixel of interest and the motion vector of the pixel of interest are similar if the assumption that the neighboring region of the pixel of interest has the same motion holds. As a result, a motion vector that is accurate to some extent is also given to pixels for which no motion vector has been assigned, and a motion vector is assigned to all pixels on the interpolation frame F in the state 84. In this case as well, since motion vectors of a plurality of surrounding pixels exist as candidates, the allocation compensator 57 obtains an evaluation value for each motion vector in the same manner as the vector allocation unit 54, and based on the evaluation values Select the motion vector to be assigned.

状態84は、画像補間部58に入力される、フレームtおよびフレームt+1、並びに、すべての画素に動きベクトルが割り付けられた内挿フレームFの状態を表している。これらのすべての画素に割り付けられた動きベクトルにより、画像補間部58は、内挿フレームF上の画素と、2枚のフレームtおよびフレームt+1の画素の位置関係を決定することができる。したがって、画像補間部58は、内挿フレームF上に割り付けられた動きベクトルと、フレームtおよびフレームt+1の画素値を用いて、状態85の内挿フレームFの黒点に示されるように、内挿フレームF上の画素値を補間生成する。そして、画像補間部58は、生成された内挿フレームを出力し、その次に、必要に応じて、フレームt+1を出力することにより、60P信号の画像を、図示せぬ後段に出力する。   A state 84 represents the state of the frame t and the frame t + 1 input to the image interpolation unit 58 and the state of the interpolation frame F in which motion vectors are assigned to all the pixels. Based on the motion vectors assigned to all these pixels, the image interpolation unit 58 can determine the positional relationship between the pixels on the interpolation frame F and the two frames t and t + 1. Therefore, the image interpolation unit 58 uses the motion vector allocated on the interpolation frame F and the pixel values of the frame t and the frame t + 1 to interpolate as indicated by the black dot of the interpolation frame F in the state 85. Pixel values on the frame F are generated by interpolation. Then, the image interpolation unit 58 outputs the generated interpolated frame, and then outputs the frame t + 1 as necessary, thereby outputting the 60P signal image to a subsequent stage (not shown).

次に、図5を参照して、本発明に係る信号処理装置1において用いられる動きベクトルの評価値を説明する。図4を参照して上述したように、信号処理装置1の各部(ベクトル検出部52、ベクトル割付部54、および割付補償部57)において、後段の処理に最適な動きベクトルが選択される。このとき、信号処理装置1の各部においては、動きベクトルに対する評価値として、2つのフレームの注目するベクトル量分ずらしたブロック間の相関値を表す差分絶対値和(DFD(Displaced Frame Difference))が用いられる。   Next, with reference to FIG. 5, the evaluation value of the motion vector used in the signal processing apparatus 1 according to the present invention will be described. As described above with reference to FIG. 4, in each unit (the vector detection unit 52, the vector allocation unit 54, and the allocation compensation unit 57) of the signal processing device 1, an optimal motion vector is selected for subsequent processing. At this time, in each part of the signal processing device 1, as an evaluation value for the motion vector, a sum of absolute differences (DFD (Displaced Frame Difference)) representing a correlation value between the blocks shifted by the vector amount of interest of the two frames is used. Used.

図5の例においては、時刻tのフレームt上の画素位置pを中心としたm×nのブロック、および、時刻t+1のフレームt+1上の画素位置pから注目する動きベクトルvのベクトル量分ずらした画素位置p+vを中心としたm×nのブロックの2つのブロックが示されている。これら2つのブロック間において求められる差分絶対値和DFDt(p)は、次の式(1)で表される。   In the example of FIG. 5, the m × n block centered on the pixel position p on the frame t at the time t and the vector amount of the motion vector v of interest are shifted from the pixel position p on the frame t + 1 at the time t + 1. Two blocks of m × n blocks centered on the pixel position p + v are shown. The sum of absolute differences DFDt (p) obtained between these two blocks is expressed by the following equation (1).

Figure 0004432714
・・・(1)
Figure 0004432714
... (1)

ここで、Ft(p)は、時刻tにおける画素位置pの輝度値を表しており、m×nは、差分絶対値和を求めるためのDFD演算範囲(ブロック)を表している。この差分絶対値和は、2つのフレームにおけるDFD演算範囲(ブロック)間の相関値を表しているため、一般的には、この差分絶対値和が小さいほどフレーム間のブロックの波形が一致しており、差分絶対値和が小さいほど、動きベクトルvの信頼度が高いと判定される。これにより、この差分絶対値和は、複数の候補の中から、最も確からしい動きベクトルを選ぶ場合などに用いられる。   Here, Ft (p) represents the luminance value at the pixel position p at time t, and m × n represents the DFD calculation range (block) for obtaining the sum of absolute differences. Since this difference absolute value sum represents a correlation value between DFD calculation ranges (blocks) in two frames, generally, the smaller the difference absolute value sum, the more the waveform of the block between the frames matches. Thus, it is determined that the reliability of the motion vector v is higher as the difference absolute value sum is smaller. As a result, this sum of absolute differences is used when the most probable motion vector is selected from a plurality of candidates.

したがって、以降、信号処理装置1の各部(ベクトル検出部52、ベクトル割付部54、および割付補償部57)においては、動きベクトルが選択される場合の評価値として、特に言及しない場合には、差分絶対値和(以下、評価値DFDと称する)が用いられることとする。   Therefore, hereinafter, in each unit (vector detection unit 52, vector allocation unit 54, and allocation compensation unit 57) of signal processing device 1, as an evaluation value when a motion vector is selected, a difference is obtained unless otherwise specified. An absolute value sum (hereinafter referred to as an evaluation value DFD) is used.

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

ステップS1において、ベクトル検出部52は、時刻t+1の入力画像のフレームt+1と、フレームメモリ51の入力画像の1つ前の時刻tのフレームtの画素値を入力し、ステップS2に進む。なお、このとき、ベクトル割付部54、割付補償部57および画像補間部58は、時刻t+1の入力画像のフレームt+1と、フレームメモリ51の入力画像の1つ前の時刻tのフレームtの画素値を入力する。   In step S1, the vector detection unit 52 inputs the pixel value of the frame t + 1 of the input image at the time t + 1 and the pixel t of the frame t at the time t immediately before the input image of the frame memory 51, and proceeds to step S2. At this time, the vector allocating unit 54, the allocation compensating unit 57, and the image interpolating unit 58 determine the pixel value of the frame t + 1 of the input image at the time t + 1 and the frame t at the time t immediately before the input image of the frame memory 51. Enter.

ステップS2において、ベクトル検出部52は、動きベクトル検出処理を実行し、ステップS3に進む。すなわち、ベクトル検出部52は、フレームメモリ51上のフレームtの着目ブロックと、入力画像である次のフレームt+1の対象ブロックの間で動きベクトルを検出し、検出した動きベクトルを、検出ベクトルメモリ53に記憶し、ステップS3に進む。この2フレーム間の動きベクトルの検出方法には、勾配法またはブロックマッチング法などが用いられる。また、動きベクトルの候補が複数ある場合には、各動きベクトルに対して、評価値DFDが求められ、求められた評価値DFDに基づいた信頼度の高い動きベクトルが検出される。すなわち、この場合、動きベクトルを検出する着目ブロックにおいて、最も確からしい動きベクトルが選択され、検出される。ステップS2における、動きベクトル検出処理の詳細は、後述する。   In step S2, the vector detection unit 52 executes a motion vector detection process and proceeds to step S3. That is, the vector detection unit 52 detects a motion vector between the target block of the frame t on the frame memory 51 and the target block of the next frame t + 1 that is the input image, and the detected motion vector is detected by the detection vector memory 53. And proceed to step S3. As a method for detecting the motion vector between the two frames, a gradient method or a block matching method is used. When there are a plurality of motion vector candidates, an evaluation value DFD is obtained for each motion vector, and a highly reliable motion vector based on the obtained evaluation value DFD is detected. That is, in this case, the most probable motion vector is selected and detected in the target block for detecting the motion vector. Details of the motion vector detection process in step S2 will be described later.

ステップS3において、ベクトル割付部54は、ベクトル割付処理を実行し、ステップS4に進む。すなわち、ベクトル割付部54は、ステップS3において、フレームt上において求められた動きベクトルを、割付ベクトルメモリ55上の、補間する内挿フレーム上の着目画素に割り付け、動きベクトルが割り付けられた画素の割付フラグメモリ56の割付フラグを1(True)に書き換える。例えば、Trueである割付フラグは、対応する画素に動きベクトルが割り付けられていることを示し、Falseである割付フラグは、対応する画素に動きベクトルが割り付けられていないことを示す。なお、各画素において、動きベクトルの候補が複数ある場合には、各動きベクトルに対して、評価値DFDが求められ、求められた評価値DFDに基づいた信頼度の高い動きベクトルが割り付けられる。すなわち、この場合、動きベクトルを割り付ける着目画素において、最も確からしい動きベクトルが選択され、割り付けられる。ステップS3における、ベクトル割付処理の詳細は、後述する。   In step S3, the vector allocation unit 54 executes vector allocation processing, and proceeds to step S4. That is, in step S3, the vector allocation unit 54 allocates the motion vector obtained on the frame t to the pixel of interest on the interpolation frame to be interpolated in the allocation vector memory 55, and the pixel to which the motion vector is allocated. The allocation flag in the allocation flag memory 56 is rewritten to 1 (True). For example, an allocation flag that is True indicates that a motion vector is allocated to the corresponding pixel, and an allocation flag that is False indicates that a motion vector is not allocated to the corresponding pixel. When there are a plurality of motion vector candidates in each pixel, an evaluation value DFD is obtained for each motion vector, and a highly reliable motion vector based on the obtained evaluation value DFD is assigned. That is, in this case, the most probable motion vector is selected and assigned in the target pixel to which the motion vector is assigned. Details of the vector allocation processing in step S3 will be described later.

ステップS4において、割付補償部57は、割付補償処理を実行し、ステップS5に進む。すなわち、割付補償部57は、ステップS4において、割付フラグメモリ56の割付フラグを参照し、ベクトル割付部54により動きベクトルが割り付けられなかった着目画素に対して、その着目画素の周辺画素の動きベクトルを補い、割付ベクトルメモリ55の内挿フレーム上に割り付ける。このとき、割付補償部57は、動きベクトルを補い、割付けた着目画素の割付フラグを1(True)に書き換える。なお、周辺画素の動きベクトルが複数ある場合には、各動きベクトルに対して、評価値DFDが求められ、求められた評価値DFDに基づいた、信頼度の高い動きベクトルが割り付けられる。すなわち、この場合、動きベクトルを割り付ける着目画素において、最も確からしい動きベクトルが選択され、割り付けられる。ステップS4における、割付補償処理の詳細は、後述する。   In step S4, the allocation compensator 57 performs an allocation compensation process, and proceeds to step S5. That is, the allocation compensation unit 57 refers to the allocation flag in the allocation flag memory 56 in step S4, and for the pixel of interest for which no motion vector has been allocated by the vector allocation unit 54, the motion vector of the surrounding pixels of the pixel of interest. Is allocated on the interpolation frame of the allocation vector memory 55. At this time, the allocation compensator 57 compensates the motion vector and rewrites the allocation flag of the allocated pixel of interest to 1 (True). When there are a plurality of motion vectors of peripheral pixels, an evaluation value DFD is obtained for each motion vector, and a highly reliable motion vector is assigned based on the obtained evaluation value DFD. That is, in this case, the most probable motion vector is selected and assigned in the target pixel to which the motion vector is assigned. Details of the allocation compensation processing in step S4 will be described later.

ステップS5において、画像補間部58は、画像補間処理を実行する。すなわち、画像補間部58は、ステップS5において、割付ベクトルメモリ55の内挿フレームに割り付けられた動きベクトルと、フレームtおよびフレームt+1の画素値を用いて、内挿フレームの画素値を補間生成し、ステップS6に進む。ステップS5における、画像補間処理の詳細は後述する。画像補間部58は、ステップS6において、生成された内挿フレームを出力し、その次に、必要に応じて、フレームt+1を出力することにより、60P信号の画像を、図示せぬ後段に出力し、ステップS7に進む。   In step S5, the image interpolation unit 58 executes an image interpolation process. That is, in step S5, the image interpolation unit 58 uses the motion vector allocated to the interpolation frame of the allocation vector memory 55 and the pixel values of the frame t and the frame t + 1 to generate an interpolation frame pixel value. The process proceeds to step S6. Details of the image interpolation processing in step S5 will be described later. In step S6, the image interpolation unit 58 outputs the generated interpolation frame, and then outputs the frame t + 1 as necessary, thereby outputting the 60P signal image to a subsequent stage (not shown). The process proceeds to step S7.

ステップS7において、ベクトル検出部52は、すべてのフレームの処理が終了したか否かを判断し、すべてのフレームの処理が終了していないと判断した場合、ステップS1に戻り、それ以降の処理を繰り返す。一方、ベクトル検出部52は、ステップS7において、すべてのフレームの処理が終了したと判断した場合、フレーム周波数を変換する処理を終了する。   In step S7, the vector detection unit 52 determines whether or not all the frames have been processed. If the vector detection unit 52 determines that all the frames have not been processed, the process returns to step S1 and the subsequent processing is performed. repeat. On the other hand, when the vector detection unit 52 determines in step S7 that all the frames have been processed, the vector detection unit 52 ends the process of converting the frame frequency.

以上のように、本発明に係る信号処理装置1は、24P信号の入力画像のフレームから動きベクトルを検出し、検出した動きベクトルを、60P信号のフレーム上の画素に割付け、割付けられた動きベクトルに基づいて、60P信号のフレーム上の画素値を生成する。このとき、信号処理装置1は、各処理において、評価値DFD(差分絶対値和)に基づく、より信頼度の高い動きベクトルを選択し、後段に出力する。したがって、信号処理装置1においては、動きが破綻することなどが抑制され、より精度のよい画像を生成することができる。   As described above, the signal processing apparatus 1 according to the present invention detects a motion vector from a frame of a 24P signal input image, assigns the detected motion vector to a pixel on a frame of a 60P signal, and assigns the assigned motion vector. Based on the above, the pixel value on the frame of the 60P signal is generated. At this time, the signal processing apparatus 1 selects a motion vector with higher reliability based on the evaluation value DFD (sum of absolute differences) in each process, and outputs it to the subsequent stage. Therefore, in the signal processing device 1, it is possible to suppress a failure of the movement and the like and generate a more accurate image.

次に、画像補間部58の構成の詳細について説明する。   Next, details of the configuration of the image interpolation unit 58 will be described.

図7は、画像補間部58の構成を示すブロック図である。図7に構成を示す画像補間部58は、割付ベクトルメモリ55の内挿フレームに割り付けられた動きベクトルと、フレームtおよびフレームt+1の画素値を用いて、内挿フレームの画素値を補間生成し、60P信号の画像を出力する処理を行う。   FIG. 7 is a block diagram illustrating a configuration of the image interpolation unit 58. The image interpolation unit 58 having the configuration shown in FIG. 7 interpolates and generates the pixel value of the interpolation frame using the motion vector allocated to the interpolation frame in the allocation vector memory 55 and the pixel values of the frame t and the frame t + 1. , 60P signal image processing is performed.

図7の例において、時刻tの画像のフレームtは、空間フィルタ92−1に入力され、時刻t+1の画像のフレームt+1は、空間フィルタ92−2およびバッファ95に入力される。   In the example of FIG. 7, the frame t of the image at time t is input to the spatial filter 92-1, and the frame t + 1 of the image at time t + 1 is input to the spatial filter 92-2 and the buffer 95.

補間制御部91は、割付ベクトルメモリ55の内挿フレームの画素を選択し、選択した画素に割り付けられている動きベクトルに基づいて、内挿フレーム上の画素と、2枚のフレームtおよびフレームt+1の画素との位置関係(空間シフト量)をそれぞれ求める。すなわち、補間制御部91は、内挿フレームの画素を基準に、その動きベクトルで対応付けられるフレームt上の位置と、内挿フレームの画素に対応するフレームt上の画素の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ92−1に供給する。同様に、補間制御部91は、内挿フレームの画素を基準に、その動きベクトルで対応付けられるフレームt+1上の位置と、内挿フレームの画素に対応するフレームt+1上の画素の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ92−2に供給する。   The interpolation control unit 91 selects the pixel of the interpolation frame in the allocation vector memory 55, and based on the motion vector assigned to the selected pixel, the pixel on the interpolation frame, the two frames t and t + 1 The positional relationship (spatial shift amount) with each pixel is obtained. That is, the interpolation control unit 91 uses, based on the pixels of the interpolated frame, the position on the frame t associated with the motion vector and the position of the pixel on the frame t corresponding to the pixel of the interpolated frame. The spatial shift amount is obtained, and the obtained spatial shift amount is supplied to the spatial filter 92-1. Similarly, the interpolation control unit 91 uses, based on the pixels of the interpolation frame, the position on the frame t + 1 associated with the motion vector and the position of the pixel on the frame t + 1 corresponding to the pixel of the interpolation frame. Is obtained, and the obtained spatial shift amount is supplied to the spatial filter 92-2.

また、補間制御部91は、予め設定されている内挿フレームの時間位相(時刻)に基づいて、フレームtとフレームt+1の間における補間重みを求め、求めた補間重みを、乗算器93−1および93−2に設定する。例えば、内挿フレームの時刻が、フレームt+1の時刻t+1から「k」離れた時刻で、かつ、フレームtの時刻tから「1−k」離れた時刻である場合(すなわち、内挿フレームが時刻tと時刻t+1を「1−k」:「k」に内分する時刻に生成される場合)、補間制御部91は、乗算器93−1に「1−k」の補間重みを設定し、乗算器93−2に「k」の補間重みを設定する。   Further, the interpolation control unit 91 obtains an interpolation weight between the frame t and the frame t + 1 based on a preset time phase (time) of the interpolation frame, and uses the obtained interpolation weight as a multiplier 93-1. And 93-2. For example, when the time of the interpolation frame is a time that is “k” away from the time t + 1 of the frame t + 1 and a time that is “1−k” away from the time t of the frame t (ie, the time of the interpolation frame is the time t and time t + 1 is “1−k”: generated at a time that is internally divided into “k”), the interpolation control unit 91 sets an interpolation weight of “1-k” in the multiplier 93-1. An interpolation weight of “k” is set in the multiplier 93-2.

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

なお、内挿フレームの画素の位置が、フレームtまたはフレームt+1上の画素の位置と一致しない場合(すなわち、内挿フレームの画素の位置が、フレームtまたはフレームt+1において画素以下成分である場合)、空間フィルタ92−1および92−2は、フレームtまたはフレームt+1における内挿フレームの画素の位置の周辺4画素の画素値を用いて、周辺4画素の距離の逆比の和を求めることにより、内挿フレームの画素に対応するフレーム上の画素値を求める。すなわち、画素以下位置の画素値は、周辺4画素との距離を基にした線形補間で値が求められる(その詳細は後述する)。   When the position of the pixel in the interpolation frame does not match the position of the pixel on frame t or frame t + 1 (that is, when the position of the pixel in the interpolation frame is a component equal to or less than the pixel in frame t or frame t + 1). The spatial filters 92-1 and 92-2 obtain the sum of the inverse ratios of the distances of the four surrounding pixels by using the pixel values of the four surrounding pixels at the position of the pixel of the interpolation frame in the frame t or the frame t + 1. Then, the pixel value on the frame corresponding to the pixel of the interpolation frame is obtained. That is, the pixel value at the position below the pixel is obtained by linear interpolation based on the distance to the surrounding four pixels (details will be described later).

乗算器93−1は、空間フィルタ92−1から入力されるフレームt上の画素値に、補間制御部91により設定された補間重み「1−k」を乗算し、重み付けされた画素値を、加算器94に出力する。乗算器93−2は、空間フィルタ92−2から入力されるフレームt+1上の画素値に、補間制御部91により設定された補間重み「k」を乗算し、重み付けされた画素値を、加算器94に出力する。   The multiplier 93-1 multiplies the pixel value on the frame t input from the spatial filter 92-1 by the interpolation weight “1-k” set by the interpolation control unit 91, and the weighted pixel value is The result is output to the adder 94. The multiplier 93-2 multiplies the pixel value on the frame t + 1 input from the spatial filter 92-2 by the interpolation weight “k” set by the interpolation control unit 91, and adds the weighted pixel value to the adder. Output to 94.

加算器94は、乗算器93−1から入力される画素値と、乗算器93−2から入力される画素値を加算することにより、内挿フレームの画素の画素値を生成し、生成された内挿フレームの画素値を、バッファ95に出力する。バッファ95は、入力されたフレームt+1をバッファしている。バッファ95は、生成された内挿フレームを出力し、その次に、予め設定されている60Pフレームの時間位相(時刻)に基づいて、必要に応じて、バッファしているフレームt+1を出力することにより、60P信号の画像を、図示せぬ後段に出力する。   The adder 94 generates the pixel value of the pixel of the interpolation frame by adding the pixel value input from the multiplier 93-1 and the pixel value input from the multiplier 93-2. The pixel value of the interpolation frame is output to the buffer 95. The buffer 95 buffers the input frame t + 1. The buffer 95 outputs the generated interpolation frame, and then outputs a buffered frame t + 1 as necessary based on a preset time phase (time) of the 60P frame. Thus, an image of the 60P signal is output to a subsequent stage (not shown).

以上のように構成される画像補間部58の画像補間処理の詳細を、図8のフローチャートを参照して説明する。   Details of the image interpolation processing of the image interpolation unit 58 configured as described above will be described with reference to the flowchart of FIG.

補間制御部91は、ステップS51において、処理する内挿フレームの時間位相に基づいて、フレームtとフレームt+1の間における内挿フレームの補間重み(例えば、「k」および「1−k」)を求め、求められた補間重みを、乗算器93−1および93−2にそれぞれ設定し、ステップS52に進む。補間制御部91は、ステップS52において、割付ベクトルメモリ55の内挿フレームの画素を選択し、ステップS53に進む。なお、内挿フレーム上の画素は、フレームの左上の画素からラスタスキャン順に選択される。   In step S51, the interpolation control unit 91 calculates interpolation weights (for example, “k” and “1-k”) of the interpolation frame between the frame t and the frame t + 1 based on the time phase of the interpolation frame to be processed. The obtained interpolation weights are set in the multipliers 93-1 and 93-2, respectively, and the process proceeds to step S52. In step S52, the interpolation control unit 91 selects a pixel of the interpolation frame in the allocation vector memory 55, and proceeds to step S53. Note that the pixels on the interpolation frame are selected in the raster scan order from the upper left pixel of the frame.

補間制御部91は、ステップS53において、選択した画素に割り付けられている動きベクトルに基づいて、内挿フレーム上の画素と、2枚のフレームtおよびフレームt+1の画素との位置関係(空間シフト量)をそれぞれ求め、求められた空間シフト量を、それぞれ空間フィルタ92−1および92−2に供給し、ステップS54に進む。具体的には、補間制御部91は、ステップS53において、内挿フレームの画素を基準に、その動きベクトルで対応付けられるフレームt上の位置と、内挿フレームの画素に対応するフレームt上の画素の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ92−1に供給する。同様に、補間制御部91は、内挿フレームの画素を基準に、その動きベクトルで対応付けられるフレームt+1上の位置と、内挿フレームの画素に対応するフレームt+1上の画素の位置から、それらの空間シフト量を求め、求めた空間シフト量を空間フィルタ92−2に供給する。   In step S53, based on the motion vector assigned to the selected pixel, the interpolation control unit 91 determines the positional relationship between the pixels on the interpolation frame and the two frames t and t + 1 (space shift amount). ) And the obtained spatial shift amounts are supplied to the spatial filters 92-1 and 92-2, respectively, and the process proceeds to step S54. Specifically, in step S53, the interpolation control unit 91 uses the pixel of the interpolation frame as a reference, the position on the frame t associated with the motion vector, and the frame t corresponding to the pixel of the interpolation frame. The spatial shift amounts are obtained from the pixel positions, and the obtained spatial shift amounts are supplied to the spatial filter 92-1. Similarly, the interpolation control unit 91 uses, based on the pixels of the interpolation frame, the position on the frame t + 1 associated with the motion vector and the position of the pixel on the frame t + 1 corresponding to the pixel of the interpolation frame. Is obtained, and the obtained spatial shift amount is supplied to the spatial filter 92-2.

時刻tの画像のフレームtの画素値は、空間フィルタ92−1に入力され、時刻t+1の画像のフレームt+1の画素値は、空間フィルタ92−2に入力されている。ステップS54において、空間フィルタ92−1および92−2は、入力されるフレームtおよびt+1上の画素の画素値と、補間制御部91から供給される空間シフト量に基づいて、内挿フレームの画素に対応する、各フレーム上の画素値を求め、求めた画素値を乗算器93−1および93−2にそれぞれ出力し、ステップS55に進む。   The pixel value of the frame t of the image at time t is input to the spatial filter 92-1, and the pixel value of the frame t + 1 of the image at time t + 1 is input to the spatial filter 92-2. In step S54, the spatial filters 92-1 and 92-2 determine the pixels of the interpolation frame based on the pixel values of the pixels on the input frames t and t + 1 and the spatial shift amount supplied from the interpolation control unit 91. The pixel values on each frame corresponding to are obtained, the obtained pixel values are output to the multipliers 93-1 and 93-2, and the process proceeds to step S55.

乗算器93−1および93−2は、ステップS55において、空間フィルタ92−1または92−2から入力される各フレーム上の画素値に、補間制御部91により設定された補間重みを重み付けし、重み付けされた画素値を、加算器94に出力し、ステップS56に進む。すなわち、乗算器93−1は、空間フィルタ92−1から入力されるフレームt上の画素値に、補間制御部91により設定された補間重み「1−k」を乗算し、重み付けされた画素値を、加算器94に出力する。乗算器93−2は、空間フィルタ92−2から入力されるフレームt+1上の画素値に、補間制御部91により設定された補間重み「k」を乗算し、重み付けされた画素値を、加算器94に出力する。   In Step S55, the multipliers 93-1 and 93-2 weight the interpolation weight set by the interpolation control unit 91 to the pixel value on each frame input from the spatial filter 92-1 or 92-2, The weighted pixel value is output to the adder 94, and the process proceeds to step S56. That is, the multiplier 93-1 multiplies the pixel value on the frame t input from the spatial filter 92-1 by the interpolation weight “1-k” set by the interpolation control unit 91, and weighted pixel values. Is output to the adder 94. The multiplier 93-2 multiplies the pixel value on the frame t + 1 input from the spatial filter 92-2 by the interpolation weight “k” set by the interpolation control unit 91, and adds the weighted pixel value to the adder. Output to 94.

加算器94は、ステップS56において、乗算器93−1により重み付けされた画素値と、乗算器93−2により重み付けされた画素値を加算することにより、内挿フレームの画素の画素値を生成し、生成された画素値を、バッファ95に出力し、ステップS57に進む。補間制御部91は、ステップS57において、内挿フレーム上のすべての画素についての処理が終了したか否かを判断し、内挿フレーム上のすべての画素についての処理が終了していないと判断した場合、ステップS52に戻り、それ以降の処理を繰り返す。補間制御部91は、ステップS57において、内挿フレーム上のすべての画素についての処理が終了したと判断した場合、画像補間処理を終了する。   In step S56, the adder 94 adds the pixel value weighted by the multiplier 93-1 and the pixel value weighted by the multiplier 93-2 to generate the pixel value of the pixel of the interpolation frame. The generated pixel value is output to the buffer 95, and the process proceeds to step S57. In step S57, the interpolation control unit 91 determines whether or not the processing for all the pixels on the interpolation frame is completed, and determines that the processing for all the pixels on the interpolation frame is not completed. If so, the process returns to step S52, and the subsequent processing is repeated. If the interpolation control unit 91 determines in step S57 that the processing for all the pixels on the interpolation frame has been completed, the interpolation control unit 91 ends the image interpolation processing.

以上のように、内挿フレームに割り付けられた動きベクトルに基づいて、内挿フレームの画素値が生成され、上述した図6のステップS6において、バッファ95により、内挿フレームが出力され、その次に、必要に応じて、フレームt+1が出力されることにより、60P信号の画像が、後段に出力される。したがって、内挿フレームの画素に、最も確からしい動きベクトルが割り付くので、精度のよい内挿フレームを生成することができる。   As described above, the pixel value of the interpolation frame is generated based on the motion vector assigned to the interpolation frame, and the interpolation frame is output by the buffer 95 in step S6 of FIG. If necessary, the frame t + 1 is output, so that an image of the 60P signal is output to the subsequent stage. Therefore, since the most probable motion vector is assigned to the pixel of the interpolation frame, an accurate interpolation frame can be generated.

次に、ベクトル検出部52の構成の詳細について説明する。   Next, details of the configuration of the vector detection unit 52 will be described.

図9は、ベクトル検出部52の構成を示すブロック図である。図9に構成を示すベクトル検出部52は、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、フレームt上の動きベクトルを検出する。この動きベクトルを検出する処理は、複数の画素からなる所定のブロック毎に実行される。   FIG. 9 is a block diagram showing the configuration of the vector detection unit 52. The vector detection unit 52 having the configuration shown in FIG. 9 detects a motion vector on the frame t by using the input frame t of the image at time t and the frame t + 1 of the image at time t + 1. The process of detecting the motion vector is executed for each predetermined block composed of a plurality of pixels.

初期ベクトル選択部101は、所定のブロック毎に、過去の動きベクトルの検出結果から求められる信頼度が高い動きベクトルを、勾配法に用いられる初期値となる初期ベクトルV0として、反復勾配法演算部103に出力する。具体的には、初期ベクトル選択部101は、検出ベクトルメモリ53に記憶される過去に求められた周辺のブロックの動きベクトルや、シフト初期ベクトルメモリ107に記憶されるシフト初期ベクトルを、初期ベクトルの候補ベクトルとして選択する。そして、初期ベクトル選択部101は、フレームtとフレームt+1を用いて、候補ベクトルの評価値DFDを求め、候補ベクトルの中から、求められた評価値DFDに基づく、最も信頼度が高いものを選択し、初期ベクトルV0として出力する。なお、初期ベクトル選択部101の構成の詳細は、後述する。   The initial vector selection unit 101 uses, as an initial vector V0 that is an initial value used in the gradient method, a high-reliability motion vector obtained from the detection result of the past motion vector for each predetermined block, as an iterative gradient method calculation unit. To 103. Specifically, the initial vector selection unit 101 uses a motion vector of a peripheral block obtained in the past stored in the detection vector memory 53 or a shift initial vector stored in the shift initial vector memory 107 as an initial vector. Select as a candidate vector. Then, the initial vector selection unit 101 obtains the evaluation value DFD of the candidate vector using the frame t and the frame t + 1, and selects the candidate vector having the highest reliability based on the obtained evaluation value DFD. And output as an initial vector V0. Details of the configuration of the initial vector selection unit 101 will be described later.

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

反復勾配法演算部103は、初期ベクトル選択部101から入力された初期ベクトルV0と、プリフィルタ102−1および102−2を介して入力されるフレームtおよびフレームt+1を用いて、所定のブロック毎に、勾配法により、動きベクトルVnを算出する。反復勾配法演算部103は、初期ベクトルV0と、算出された動きベクトルVnをベクトル評価部104に出力する。また、反復勾配法演算部103は、ベクトル評価部104による動きベクトルの評価結果に基づいて、勾配法の演算を繰り返し行い、動きベクトルVnを算出する。なお、反復勾配法演算部103の構成の詳細は、後述する。   The iterative gradient method computing unit 103 uses the initial vector V0 input from the initial vector selection unit 101 and the frame t and the frame t + 1 input via the prefilters 102-1 and 102-2, for each predetermined block. Then, the motion vector Vn is calculated by the gradient method. The iterative gradient method computing unit 103 outputs the initial vector V0 and the calculated motion vector Vn to the vector evaluation unit 104. In addition, the iterative gradient method computing unit 103 repeatedly performs the gradient method computation based on the motion vector evaluation result by the vector evaluation unit 104 to calculate the motion vector Vn. Details of the configuration of the iterative gradient method computing unit 103 will be described later.

ベクトル評価部104は、反復勾配法演算部103からの動きベクトルVn−1(または初期ベクトルV0)と、動きベクトルVnの評価値DFDを求め、求められた評価値DFDに基づいて、反復勾配法演算部103を制御し、勾配法の演算を繰り返し実行させ、最終的に、評価値DFDに基づく、信頼性の高いものを選択し、動きベクトルVとして、検出ベクトルメモリ53に記憶する。このとき、ベクトル評価部104は、動きベクトルVとともに、その動きベクトルVに対して求められた評価値DFDを、シフト初期ベクトル割付部105に供給する。   The vector evaluation unit 104 obtains the motion vector Vn−1 (or initial vector V0) from the iterative gradient method computing unit 103 and the evaluation value DFD of the motion vector Vn, and based on the obtained evaluation value DFD, the iterative gradient method The calculation unit 103 is controlled to repeatedly execute the calculation of the gradient method. Finally, a highly reliable one based on the evaluation value DFD is selected and stored in the detection vector memory 53 as a motion vector V. At this time, the vector evaluation unit 104 supplies the evaluation value DFD obtained for the motion vector V together with the motion vector V to the shifted initial vector allocation unit 105.

シフト初期ベクトル割付部105は、ベクトル評価部104より動きベクトルVおよびその評価値DFDが供給されると、次のフレーム上の着目ブロックを通過する動きベクトルを、その着目ブロックにシフトさせた、シフト初期ベクトルとして設定する。換言すると、シフト初期ベクトル割付部105は、動きベクトルVの終点のブロックと同じ位置の次のフレーム上の着目ブロックを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトルを、シフト初期ベクトルとして設定する。そして、シフト初期ベクトル割付部105は、設定したシフト初期ベクトルを、着目ブロックに対応させて、シフト初期ベクトルメモリ107に割り付ける。   When the motion vector V and the evaluation value DFD are supplied from the vector evaluation unit 104, the shifted initial vector allocation unit 105 shifts the motion vector passing through the target block on the next frame to the target block. Set as initial vector. In other words, the shifted initial vector allocation unit 105 shifts a motion vector of 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 initial vector. Then, the shifted initial vector allocation unit 105 allocates the set shifted initial vector to the shifted initial vector memory 107 in association with the block of interest.

具体的には、シフト初期ベクトル割付部105は、シフト初期ベクトルとして割り付けられた動きベクトルVの評価値DFDを、着目ブロックに対応させて、評価値メモリ106に記憶させておき、同じ着目ブロックを通過する(すなわち、着目ブロックと同じ位置の過去のフレームのブロックを終点とする)他の動きベクトルVの評価値DFDと比較する。そして、シフト初期ベクトル割付部105は、評価値DFDに基づく、信頼度が高いとされた動きベクトルVを、着目ブロックにシフトさせ、着目ブロックのシフト初期ベクトルとして、シフト初期ベクトルメモリ107に割り付ける。なお、シフト初期ベクトル割付部105の構成の詳細は、後述する。   Specifically, the shifted initial vector allocation unit 105 stores the evaluation value DFD of the motion vector V allocated as the shifted initial vector in the evaluation value memory 106 in association with the target block, and stores the same target block. It is compared with the evaluation value DFD of another motion vector V that passes (that is, the block of the past frame at the same position as the target block). Then, the shifted initial vector allocation unit 105 shifts the motion vector V determined to have high reliability based on the evaluation value DFD to the target block, and allocates it to the shifted initial vector memory 107 as the shifted initial vector of the target block. Details of the configuration of the shifted initial vector allocation unit 105 will be described later.

次に、ベクトル検出部52において用いられる勾配法の原理について説明する。まず、動画像中において、水平、垂直、時間軸を用いた座標(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)で表される。 Next, the principle of the gradient method used in the vector detection unit 52 will be described. First, a luminance value of a pixel represented by coordinates (x, y, t) using a horizontal, vertical, and time axis in a moving image is assumed to be g (x, y, t). Here, when the pixel of interest (x 0 , y 0 , t 0 ) is displaced by (dx, dy, dt) during a minute time, the horizontal (vertical) and time axis gradients (difference differences) are respectively expressed as 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 is approximated by Taylor expansion. Is expressed by the following equation (2).

g(x0+dx,y0+dy,t0+dt)
≒ g(x0,y0,t0)+gx(x0,y0,t0)dx
+ gy(x0,y0,t0)dy+gt(x0,y0,t0)dt
・・・(2)
g (x 0 + dx, y 0 + dy, t 0 + dt)
≒ g (x 0 , y 0 , t 0 ) + gx (x 0 , y 0 , t 0 ) dx
+ Gy (x 0 , y 0 , t 0 ) dy + gt (x 0 , y 0 , t 0 ) dt
... (2)

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

g(x0+vx,y0+vy,t0+1) = g(x0,y0,t0
・・・(3)
g (x 0 + vx, y 0 + vy, t 0 +1) = g (x 0, y 0, t 0)
... (3)

式(2)を式(3)に代入すると、次の式(4)で表される。   When Expression (2) is substituted into Expression (3), it is expressed by the following Expression (4).

gx(x0,y0,t0)vx+gy(x0,y0,t0)vy
+gt(x0,y0,t0) = 0
・・・(4)
gx (x 0 , y 0 , t 0 ) vx + gy (x 0 , y 0 , t 0 ) vy
+ Gt (x 0 , y 0 , t 0 ) = 0
... (4)

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

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

d = g(x+vx,y+vy,t+1)−g(x,y,t)
= Δxvx+Δyvy+Δt
・・・(5)
d = g (x + vx, y + vy, t + 1) −g (x, y, t)
= Δxvx + Δyvy + Δt
... (5)

式(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, Δy = gy (x, y, t), which represents a vertical gradient, Δt = gt ( x, y, t), which represents the gradient in the time direction. Using these, assuming that the square sum of the difference between motion compensation frames is E, it is expressed by Equation (6).

E = Σd2
= Σ(Δx2vx2+Δy2vy2+2ΔxΔyvxvy
+2ΔxΔtvx+2ΔyΔtvy+Δt2
=vx2ΣΔx2+vy2ΣΔy2+2vxvyΣΔxΔy
+2vxΣΔxΔt+2vyΣΔyΔt+ΣΔt2
・・・(6)
E = Σd 2
= Σ (Δx 2 vx 2 + Δy 2 vy 2 + 2ΔxΔyvxvy
+ 2ΔxΔtvx + 2ΔyΔtvy + Δt 2 )
= Vx 2 ΣΔx 2 + vy 2 ΣΔy 2 +2 vxvy ΣΔxΔy
+ 2vxΣΔxΔt + 2vyΣΔyΔt + ΣΔt 2
... (6)

ここで、Eが最小となる(vx,vy)は、各変数における偏微分値が0になるとき、すなわち、ΔE/Δvx=ΔE/Δvy=0の条件が成立するときなので、式(6)から、次の式(7)および式(8)となる。   Here, E becomes the minimum (vx, vy) when the partial differential value in each variable becomes 0, that is, when the condition of ΔE / Δvx = ΔE / Δvy = 0 is satisfied. Thus, the following equations (7) and (8) are obtained.

vxΣΔx2+vyΣΔxΔy+ΣΔxΔt = 0
・・・(7)
vyΣΔy2+vxΣΔxΔy+ΣΔyΔt = 0
・・・(8)
vxΣΔx 2 + vyΣΔxΔy + ΣΔxΔt = 0
... (7)
vyΣΔy 2 + vxΣΔxΔy + ΣΔyΔt = 0
... (8)

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

Figure 0004432714
・・・(9)
Figure 0004432714
... (9)

ここで、図10を参照して、具体的に説明する。図10の例において、矢印Xは、水平方向を示しており、矢印Yは、垂直方向を示している。また、矢印Tは、図中、右奥の時刻tのフレームtから、左手前の時刻t+1のフレームt+1への時間の経過方向を示している。なお、図10の例においては、各フレームは、着目画素pの周辺領域(ブロック)として、勾配法演算に用いられる8画素×8画素の領域のみ示されている。   Here, it demonstrates concretely with reference to FIG. In the example of FIG. 10, an arrow X indicates the horizontal direction, and an arrow Y indicates the vertical direction. In addition, an arrow T indicates the direction of time passage from the frame t at the time t in the back right to the frame t + 1 at the time t + 1 in the left front. In the example of FIG. 10, each frame shows only an area of 8 pixels × 8 pixels used for the gradient method calculation as a peripheral area (block) of the pixel of interest p.

フレーム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, 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 using the gradient method described above, the motion vector V (vx , Vy) is the difference in luminance (ie, gradient) Δx and Δy between adjacent pixels px and py obtained for the x and y directions of the pixel of interest p, and the same phase of the pixel of interest p obtained in frame t + 1. A difference in luminance (gradient) Δt in the time direction with respect to the pixel q located is obtained for all pixels in the peripheral region (8 pixels × 8 pixels) of the pixel of interest p, and the difference between them is expressed by Equation (9). It can obtain | require by calculating using.

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

一般的に、このような勾配法を用いた動きベクトル検出方法においては、微小動きに対して精度の高い結果が得られる。しかしながら、実際の動画像の中で動きを求めようとするとする場合、この勾配法は、その動き量が大きすぎるため実用的とはいえない。これに対応して、この勾配法を複数回反復する方法が考えられる。勾配法を反復して実行することにより、各演算で求められる動き量が収束するため、徐々に正しい動きが求められる。   Generally, in a motion vector detection method using such a gradient method, a highly accurate result can be obtained for a minute motion. However, when trying to obtain a motion in an actual moving image, this gradient method is not practical because the amount of motion is too large. Correspondingly, a method of repeating this gradient method a plurality of times is conceivable. By repeatedly executing the gradient method, the amount of motion obtained by each calculation converges, so that a correct motion is gradually obtained.

しかしながら、ただ、勾配法を反復するだけでは、リアルタイム処理を行おうとした場合、演算時間の面から実用的ではない。そこで、ベクトル検出部52においては、過去フレームと現在フレームでの周辺画素の動きに基づいて求められる初期ベクトルを、初期値として用いることで、勾配法の繰り返し回数を軽減している。すなわち、動きの起点となる着目画素から、初期ベクトルが指す先へオフセットを予め加えることで大まかな動きを算出し、オフセットが加えられたその位置から勾配法を用いた演算を行うようにすれば、画素以下動きを含めた微調整を行うことができる。これにより、演算時間を増大させることなく、精度のよい動きベクトルを検出することができる。   However, it is not practical from the viewpoint of calculation time when trying to perform real-time processing only by repeating the gradient method. Therefore, the vector detection unit 52 reduces the number of iterations of the gradient method by using, as an initial value, an initial vector obtained based on the motion of surrounding pixels in 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. Fine adjustment including movement below the pixel can be performed. Thereby, an accurate motion vector can be detected without increasing the calculation time.

図11は、初期ベクトルを用いて実行される反復勾配法について具体的に説明する図である。図11の例においては、矢印Tは、図中、左手前の時刻tのフレームtから、右奥の時刻t+1のフレームt+1への時間の経過を示している。なお、各画素p,q0,q1,q2,およびq3を中心としたブロックは、その画素の、勾配法演算に用いられる周辺領域(ブロック)を表している。   FIG. 11 is a diagram specifically explaining the iterative gradient method executed using the initial vector. In the example of FIG. 11, the arrow T indicates the passage of time from the frame t at the time t on the left front side to the frame t + 1 at the time t + 1 on the right back in the drawing. A block centered on each pixel p, q0, q1, q2, and q3 represents a peripheral region (block) used for the gradient method calculation of that pixel.

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

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

V = v0+v1+v2
・・・(10)
V = v0 + v1 + v2
... (10)

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

次に、図12のフローチャートを参照して、動きベクトル検出処理の詳細について説明する。ベクトル検出部52には、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1が入力される。   Next, details of the motion vector detection process will be described with reference to the flowchart of FIG. The vector detection unit 52 receives the input frame t of the image at time t and input frame t + 1 of the image at time t + 1.

初期ベクトル選択部101は、ステップS101において、フレームt上の処理の対象となるブロックを、着目ブロックとして選択し、ステップS102に進む。なお、フレーム上においては、左上のブロックからラスタスキャン順に処理が実行される。   In step S101, the initial vector selection unit 101 selects a block to be processed on the frame t as a target block, and the process proceeds to step S102. On the frame, the processing is executed in the raster scan order from the upper left block.

ステップS102において、初期ベクトル選択部101は、初期ベクトル選択処理を実行する。初期ベクトル選択部101は、ステップS101において、所定のブロック毎に、過去の動きベクトルの検出結果から、信頼度が高い動きベクトルを選択し、選択した動きベクトルを、勾配法に用いられる初期値となる初期ベクトルV0として、反復勾配法演算部103に出力し、ステップS103に進む。   In step S102, the initial vector selection unit 101 performs an initial vector selection process. In step S101, the initial vector selection unit 101 selects a motion vector with high reliability from the detection result of the past motion vector for each predetermined block, and uses the selected motion vector as an initial value used in the gradient method. The initial vector V0 is output to the iterative gradient method computing unit 103, and the process proceeds to step S103.

すなわち、初期ベクトル選択部101は、過去の勾配法演算評価処理(後述するステップS103)において求められ、検出ベクトルメモリ53に記憶された周辺ブロックの動きベクトルや、過去のシフト初期ベクトル割付処理(後述するステップS104)においてシフト初期ベクトルメモリ107に記憶されたシフト初期ベクトルを、初期ベクトルの候補ベクトルとして選択する。そして、初期ベクトル選択部101は、フレームtとフレームt+1を用いて、候補ベクトルの評価値DFDを求め、候補ベクトルの中から、求められた評価値DFDに基づいた信頼度が高いものを選択し、選択された候補ベクトルを、初期ベクトルV0として出力する。なお、ステップS102における、初期ベクトル選択処理の詳細は、後述する。   That is, the initial vector selection unit 101 obtains the motion vector of the peripheral blocks obtained in the past gradient method calculation evaluation process (step S103 described later) and stored in the detection vector memory 53, and the past shifted initial vector allocation process (described later). In step S104), the shifted initial vector stored in the shifted initial vector memory 107 is selected as an initial vector candidate vector. Then, the initial vector selection unit 101 obtains the evaluation value DFD of the candidate vector using the frame t and the frame t + 1, and selects a candidate vector having a high reliability based on the obtained evaluation value DFD. The selected candidate vector is output as the initial vector V0. Details of the initial vector selection process in step S102 will be described later.

ステップS103において、反復勾配法演算部103およびベクトル評価部104は、反復勾配法演算評価処理(なお、反復勾配法演算処理とも称する)を実行し、ステップS104に進む。具体的には、ステップS103において、反復勾配法演算部103は、初期ベクトル選択部101から入力された初期ベクトルV0と、プリフィルタ102−1および102−2を介して入力されるフレームtおよびフレームt+1を用いて、ベクトル評価部104による動きベクトルの評価結果に基づいて、勾配法の演算を繰り返し行い、動きベクトルVnを算出する。また、ベクトル評価部104は、反復勾配法演算部103からの動きベクトルVn−1と、動きベクトルVnの評価値DFDを求め、求められた評価値DFDに基づく、最も信頼性の高いものを選択し、動きベクトルVとして、検出ベクトルメモリ53に記憶する。このとき、ベクトル評価部104は、動きベクトルVとともに、その動きベクトルVに対して求めた評価値DFDを、シフト初期ベクトル割付部105に供給する。なお、ステップS103における、反復勾配法演算処理の詳細は、後述する。   In step S103, the iterative gradient method calculation unit 103 and the vector evaluation unit 104 execute an iterative gradient method calculation evaluation process (also referred to as an iterative gradient method calculation process), and the process proceeds to step S104. Specifically, in step S103, the iterative gradient method computing unit 103 receives the initial vector V0 input from the initial vector selecting unit 101, the frame t and the frame input via the prefilters 102-1 and 102-2. Based on the motion vector evaluation result by the vector evaluation unit 104 using t + 1, the gradient method is repeatedly calculated to calculate the motion vector Vn. Further, the vector evaluation unit 104 obtains the motion vector Vn−1 from the iterative gradient method computing unit 103 and the evaluation value DFD of the motion vector Vn, and selects the most reliable one based on the obtained evaluation value DFD. And stored in the detected vector memory 53 as a motion vector V. At this time, the vector evaluation unit 104 supplies the evaluation value DFD obtained for the motion vector V together with the motion vector V to the shifted initial vector allocation unit 105. Details of the iterative gradient method calculation processing in step S103 will be described later.

ステップS104において、シフト初期ベクトル割付部105は、シフト初期ベクトル割付処理を実行し、ステップS105に進む。シフト初期ベクトル割付部105は、ベクトル評価部104より動きベクトルVおよびその評価値DFDが供給されると、ステップS104において、次のフレーム上の着目ブロックを通過する動きベクトルを、その着目ブロックにシフトさせた、シフト初期ベクトルとして設定する。すなわち、換言すると、動きベクトルVの終点のブロックと同じ位置の次のフレーム上の着目ブロックを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトルが、シフト初期ベクトルとして設定される。そして、シフト初期ベクトル割付部105は、設定したシフト初期ベクトルを、着目ブロックに対応させて、シフト初期ベクトルメモリ107に割り付ける。   In step S104, the shifted initial vector allocation unit 105 executes a shifted initial vector allocation process, and proceeds to step S105. When the motion vector V and its evaluation value DFD are supplied from the vector evaluation unit 104, the shifted initial vector allocation unit 105 shifts the motion vector passing through the target block on the next frame to the target block in step S104. The shifted initial vector is set. That is, in other words, a motion vector having the same size and the same direction as the motion vector V is set as the initial shift vector, starting from the block of interest on the next frame at the same position as the end block of the motion vector V. . Then, the shifted initial vector allocation unit 105 allocates the set shifted initial vector to the shifted initial vector memory 107 in association with the block of interest.

なお、具体的には、シフト初期ベクトル割付部105は、シフト初期ベクトルとして割り付けられた動きベクトルVの評価値DFDを、着目ブロックに対応させて、評価値メモリ106に記憶させておき、同じ着目ブロックを通過する(すなわち、着目ブロックと同じ位置の過去のフレームのブロックを終点とする)他の動きベクトルVの評価値DFDと比較し、評価値DFDに基づく、信頼度が高いとされた動きベクトルVを、そのブロックにシフトさせてシフト初期ベクトルと設定し、シフトさせたブロックに対応させて、シフト初期ベクトルメモリ107に割り付ける。なお、シフト初期ベクトル割付部105の構成の詳細は、後述する。   Specifically, the shifted initial vector allocation unit 105 stores the evaluation value DFD of the motion vector V allocated as the shifted initial vector in the evaluation value memory 106 in association with the target block, so that the same target Compared with the evaluation value DFD of another motion vector V that passes through the block (that is, the block of the past frame at the same position as the target block is the end point), the motion determined to have high reliability based on the evaluation value DFD The vector V is shifted to that block and set as a shifted initial vector, and is allocated to the shifted initial vector memory 107 in correspondence with the shifted block. Details of the configuration of the shifted initial vector allocation unit 105 will be described later.

ステップS105において、初期ベクトル選択部101は、フレームtにおいて、すべてのブロックの処理が終了したか否かを判断し、すべてのブロックの処理が終了していないと判断した場合、ステップS101に戻り、それ以降の処理を繰り返す。また、ステップS105において、初期ベクトル選択部101は、フレームtにおいて、すべてのブロックの処理が終了したと判断した場合、すなわち、フレームt上のすべてのブロックにおいて、動きベクトルVが検出されたと判断し、動きベクトル検出処理を終了する。   In step S105, the initial vector selection unit 101 determines whether or not all blocks have been processed in the frame t. If it is determined that all blocks have not been processed, the initial vector selection unit 101 returns to step S101. The subsequent processing is repeated. In step S105, the initial vector selection unit 101 determines that the motion vectors V have been detected in all the blocks on the frame t when it is determined that all the blocks have been processed in the frame t. Then, the motion vector detection process ends.

以上のように、過去に検出された動きベクトルから初期ベクトルが選択され、選択された初期ベクトルに基づいて、反復勾配法の演算が用いられて、繰り返し動きベクトルが算出され、算出された動きベクトルの中から、評価値DFDに基づく、信頼度が高い(すなわち、最も確からしい)動きベクトルが検出される。この結果、検出ベクトルメモリ53に、フレームt上のすべてのブロックに対応する動きベクトルVが記憶される。   As described above, an initial vector is selected from motion vectors detected in the past, an iterative gradient method is calculated based on the selected initial vector, and a repeated motion vector is calculated. Among them, a motion vector having a high reliability (that is, most likely) based on the evaluation value DFD is detected. As a result, the motion vector V corresponding to all the blocks on the frame t is stored in the detection vector memory 53.

次に、シフト初期ベクトル割付部105の構成の詳細について説明する。   Next, the details of the configuration of the shifted initial vector allocation unit 105 will be described.

図13は、シフト初期ベクトル割付部105の構成を示すブロック図である。図13に構成を示すシフト初期ベクトル割付部105は、前(過去)フレームにおいて、ベクトル評価部104より検出された動きベクトルVに基づいて、初期ベクトルの候補ベクトルとなるシフト初期ベクトルを設定し、シフト初期ベクトルメモリ107に割り付ける処理を行う。シフト初期ベクトル割付部105には、ベクトル評価部104より検出された動きベクトルV、および、その動きベクトルVの評価値DFDが入力される。   FIG. 13 is a block diagram showing a configuration of the shifted initial vector allocating unit 105. The shifted initial vector allocation unit 105 having the configuration shown in FIG. 13 sets a shifted initial vector that is a candidate vector of the initial vector based on the motion vector V detected by the vector evaluation unit 104 in the previous (past) frame, A process of assigning to the shifted initial vector memory 107 is performed. The shifted initial vector allocation unit 105 receives the motion vector V detected by the vector evaluation unit 104 and the evaluation value DFD of the motion vector V.

割付対象位置演算部201は、ベクトル評価部104より検出された動きベクトルVが、次の時刻のフレーム上において通過するブロックの位置(すなわち、現在のフレーム上において検出された動きベクトルVの終点のブロックと同じ位置にある次のフレーム上のブロックの位置)を演算し、演算されたブロックの位置を、評価値メモリ106およびシフト初期ベクトル置換部203に供給する。   The allocation target position calculation unit 201 detects the position of the block through which the motion vector V detected by the vector evaluation unit 104 passes on the frame at the next time (that is, the end point of the motion vector V detected on the current frame). The position of the block on the next frame at the same position as the block) is calculated, and the calculated position of the block is supplied to the evaluation value memory 106 and the shifted initial vector replacement unit 203.

評価値比較部202は、動きベクトルV、および、その動きベクトルVの評価値DFDが入力されると、割付対象位置演算部201からのブロックの位置の評価値DFDを、評価値メモリ106から読み出す。そして、評価値比較部202は、評価値メモリ106から読み出された評価値DFDと、ベクトル評価部104により検出された動きベクトルVの評価値DFDとを比較判断し、検出された動きベクトルVの評価値DFDの方が小さい(すなわち、信頼度が高い)と判断した場合、シフト初期ベクトル置換部203を制御し、シフト初期ベクトルメモリ107の、シフト初期ベクトル割付部105により供給されたブロックの位置のシフト初期ベクトルを、評価値DFDに基づく、信頼度が高いと判断した動きベクトルVで書き換えさせる。また、それと同時に、評価値比較部202は、評価値置換部204を制御し、評価値メモリ106において、割付対象位置演算部201により選択されたブロックの位置の評価値DFDを、動きベクトルVの評価値DFDで書き換えさせる。   When the evaluation value comparison unit 202 receives the motion vector V and the evaluation value DFD of the motion vector V, the evaluation value comparison unit 202 reads the evaluation value DFD of the block position from the allocation target position calculation unit 201 from the evaluation value memory 106. . Then, the evaluation value comparison unit 202 compares the evaluation value DFD read from the evaluation value memory 106 with the evaluation value DFD of the motion vector V detected by the vector evaluation unit 104, and detects the detected motion vector V When the evaluation value DFD is smaller (that is, the reliability is higher), the shifted initial vector replacement unit 203 is controlled to determine the block of the block supplied by the shifted initial vector allocation unit 105 of the shifted initial vector memory 107. The position initial shift vector is rewritten with the motion vector V determined to have high reliability based on the evaluation value DFD. At the same time, the evaluation value comparison unit 202 controls the evaluation value replacement unit 204, and the evaluation value memory 106 selects the evaluation value DFD of the position of the block selected by the allocation target position calculation unit 201 in the evaluation value memory 106. Rewrite with evaluation value DFD.

シフト初期ベクトル置換部203は、シフト初期ベクトルメモリ107の、割付対象位置演算部201により供給されたブロックの位置のシフト初期ベクトルを、評価値比較部202から供給される動きベクトルV(すなわち、動きベクトルVと同じ大きさで同じ向きの動きベクトル)で書き換える。評価値置換部204は、評価値比較部202の制御のもと、評価値メモリ106において、割付対象位置演算部201により選択されたブロックの位置の評価値DFDを、動きベクトルVの評価値DFDで書き換える。   The shift initial vector replacement unit 203 uses the motion vector V (that is, the motion) supplied from the evaluation value comparison unit 202 as the shift initial vector of the block position supplied from the allocation target position calculation unit 201 in the shift initial vector memory 107. The motion vector having the same magnitude as the vector V and the same direction) is rewritten. The evaluation value replacement unit 204 converts the evaluation value DFD of the position of the block selected by the allocation target position calculation unit 201 into the evaluation value DFD of the motion vector V in the evaluation value memory 106 under the control of the evaluation value comparison unit 202. Rewrite with.

評価値メモリ106は、次のフレーム上における、各ブロックに割り当てられるシフト初期ベクトル候補の評価値DFDをブロック毎に記憶する。シフト初期ベクトルメモリ107は、次のフレームにおける各ブロックにおいて最も評価値DFDが小さい(すなわち、最も信頼度がある)動きベクトルを、シフト初期ベクトルとして、そのブロックに対応させて記憶する。   The evaluation value memory 106 stores, for each block, an evaluation value DFD of a shifted initial vector candidate assigned to each block on the next frame. The shifted initial vector memory 107 stores the motion vector having the smallest evaluation value DFD (that is, the most reliable) in each block in the next frame as a shifted initial vector in association with the block.

図14は、シフト初期ベクトル割付部105により割り付けられるシフト初期ベクトルを1次元的に説明する図である。図14の例においては、上から順に、時刻T=t−1のフレームt−1、時刻T=tのフレームt、および、時刻T=t+1のフレームt+1が示されており、各フレーム上の仕切りは、各フレームにおけるブロックの境界を示している。   FIG. 14 is a diagram for describing one-dimensionally the shifted initial vectors allocated by the shifted initial vector allocating unit 105. In the example of FIG. 14, a frame t−1 at time T = t−1, a frame t at time T = t, and a frame t + 1 at time T = t + 1 are shown in order from the top. The partition indicates a block boundary in each frame.

図14の例の場合、フレームt−1上のブロックBにおいて検出される動きベクトルを、動きベクトルV(図中、実線矢印)とし、ブロックBを始点とする動きベクトルVによるフレームt上の動き補償先(以下、オフセット先とも称する)を、ブロックBtとする。また、フレームt−1上の動きベクトルVをフレームt上のブロックBtにシフトした動きベクトルを、シフト初期ベクトルSV(図中、点線矢印)とする。なお、この場合、オフセット先とは、フレームt−1上において検出された動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロックBtのことを表しており、シフトとは、フレームt−1上において検出された動きベクトルVと同じ大きさで同じ向きの動きベクトルの始点を、フレームt−1上の動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロックBtとすることをいう。すなわち、シフト初期ベクトルSVは、フレームt−1上において検出された動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロックBtを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトルのことである。   In the case of the example in FIG. 14, the motion vector detected in the block B on the frame t−1 is the motion vector V (solid arrow in the figure), and the motion on the frame t by the motion vector V starting from the block B. A compensation destination (hereinafter also referred to as an offset destination) is a block Bt. A motion vector obtained by shifting the motion vector V on the frame t-1 to the block Bt on the frame t is defined as a shifted initial vector SV (dotted line arrow in the figure). In this case, the offset destination represents the block Bt on the frame t at the same position as the end block of the motion vector V detected on the frame t−1, and the shift means the frame t The start point of a motion vector having the same magnitude and the same direction as the motion vector V detected on -1 is a block Bt on the frame t at the same position as the end point block of the motion vector V on the frame t-1. That means. That is, the shifted initial vector SV is the same size and the same direction as the motion vector V, starting from the block Bt on the frame t at the same position as the end block of the motion vector V detected on the frame t−1. It is a motion vector.

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

したがって、このシフト初期ベクトルSVを、フレームt上の着目ブロックBtの動きベクトルを検出する場合に、勾配法演算に与える初期ベクトルの候補として用いることにより、周辺ブロックの動きベクトルだけを初期ベクトルの候補として用いる場合よりも、勾配法演算による動きベクトル検出に、より適切な初期ベクトルを得ることができる。   Therefore, when this 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 vectors of the peripheral blocks are used as initial vector candidates. It is possible to obtain a more appropriate initial vector for motion vector detection by the gradient method calculation than in the case of using as.

以上のことを、図15および図16を参照して、具体的に説明する。なお、図15および図16においては、各フレーム上には、9つのブロックが示されている。   The above will be specifically described with reference to FIGS. 15 and 16. In FIGS. 15 and 16, nine blocks are shown on each frame.

図15は、大きな動きの物体が通過しているブロックと、その周辺ブロックの動きベクトルの例を表している。図15の例の場合、1ブロックからなる、ある物体O1の画像オブジェクトは、大きな動きの動きベクトルV1で、フレームt−1上の最右端(左から9番目)のブロックから、フレームt上の左から5番目のブロックを経由して、フレームt+1上の最左端のブロックへ移動している。一方、4ブロックからなる物体O2の画像オブジェクトは、動きベクトルV1よりも小さな動きの動きベクトルV2で、フレームt−1上の左から3乃至6番目の4ブロックから、フレームt上の左から4乃至7番目の4ブロックを経由して、フレームt+1上の左から5乃至8番目の4ブロックへ移動している。すなわち、フレームt上の左から5番目のブロックにおいて、物体O1の画像オブジェクトと物体O2の画像オブジェクトは、物体O1の画像オブジェクトを手前にして交差している。   FIG. 15 shows an example of a motion vector of a block through which a large motion object passes and its neighboring blocks. In the case of the example in FIG. 15, the image object of a certain object O1 consisting of one block is a motion vector V1 of a large motion, and is on the frame t from the rightmost block (the ninth from the left) on the frame t-1. It moves to the leftmost block on frame t + 1 via the fifth block from the left. On the other hand, the image object of the object O2 composed of four blocks is a motion vector V2 having a motion smaller than the motion vector V1, and the fourth to fourth blocks from the third to sixth from the left on the frame t−1 and 4 from the left on the frame t. Through the 4th to 7th blocks, the frame moves to the 5th to 8th 4 blocks from the left on the frame t + 1. That is, in the fifth block from the left on the frame t, the image object of the object O1 and the image object of the object O2 intersect each other with the image object of the object O1 in front.

このとき、フレームt上において、物体O1の画像オブジェクトが動きベクトルV1で通過する、左から5番目のブロックの動きベクトルを検出するために、周辺ブロックの動きから初期ベクトルを抽出しようとしても、周辺ブロック(左から4または6番目のブロック)に、物体O2の画像オブジェクトが、物体O1の画像オブジェクトとは異なる動きベクトルV2で通過しているため、適切な動きベクトルは、存在しない。一方、シフト初期ベクトルSV1(図中、点線矢印)は、このような場合であっても、過去のフレームT−1上で検出された動きベクトルV1を、そのフレームt上の左から5番目のブロックにシフトした動きベクトル(すなわち、フレームt−1上において検出された動きベクトルV1の終点のブロックと同じ位置にあるフレームt上のブロックを始点とした、動きベクトルV1と同じ大きさで同じ向きの動きベクトル)であるので、確実に取得することができる。   At this time, in order to detect the motion vector of the fifth block from the left on which the image object of the object O1 passes by the motion vector V1 on the frame t, the initial vector is extracted from the motion of the peripheral blocks. Since the image object of the object O2 passes through the block (the fourth or sixth block from the left) with a motion vector V2 different from that of the image object of the object O1, there is no appropriate motion vector. On the other hand, the shift initial vector SV1 (dotted arrow in the figure) is the fifth motion vector from the left on the frame t, even in such a case, with the motion vector V1 detected on the past frame T-1. Motion vector shifted to a block (that is, the same size and the same direction as the motion vector V1, starting from a block on the frame t at the same position as the end block of the motion vector V1 detected on the frame t-1) Therefore, the motion vector can be reliably acquired.

図16は、動物体の境界のブロックと、その周辺ブロックの動きベクトルの例を表している。図16の例の場合、1ブロックからなる、ある物体O3の画像オブジェクトは、動きベクトルV3で、フレームt−1上の左から6番目のブロックから、フレームt上の左から5番目のブロックを経由して、フレームt+1上の左から4番目のブロックへ移動している。一方、9ブロック以上からなる物体O4の画像オブジェクトは、動きベクトルV1とは異なる動きベクトルV4で、フレームt−1上の全9ブロックから、フレームt上の左から2乃至9番目の8ブロックを経由して、フレームt+1上の左から3乃至9番目の7ブロックへ移動している。すなわち、物体O3の画像オブジェクトは、フレームt−1の左から6番目のブロック、フレームt上の左から5番目のブロック、およびフレームt+1左から4番目のブロックにおいて、物体O4の画像オブジェクトの手前を通過している。   FIG. 16 shows an example of a motion vector of a block at the boundary of a moving object and its surrounding blocks. In the case of the example of FIG. 16, the image object of a certain object O3 consisting of one block is a motion vector V3, and the sixth block from the left on the frame t-1 to the fifth block from the left on the frame t. Via, it moves to the fourth block from the left on the frame t + 1. On the other hand, the image object of the object O4 composed of 9 blocks or more is a motion vector V4 different from the motion vector V1, and from the 9 blocks on the frame t-1 to the 2nd to 9th 8 blocks from the left on the frame t. Via, it moves to the third to ninth seventh blocks from the left on the frame t + 1. That is, the image object of the object O3 is in front of the image object of the object O4 in the sixth block from the left of the frame t-1, the fifth block from the left on the frame t, and the fourth block from the left of the frame t + 1. Is going through.

このとき、フレームt上において、物体O3の画像オブジェクトが動きベクトルV3で通過する、左から5番目のブロックの動きベクトルを検出するために、周辺ブロックの動きから初期ベクトルを抽出しようとしても、周辺ブロック(左から4または6番目のブロック)に、物体O4の画像オブジェクトが、物体O3の画像オブジェクトとは異なる動きベクトルV4で通過しているため、適切な動きベクトルは、存在しない。しかしながら、この場合においても、図15の場合と同様に、シフト初期ベクトルSV3(図中、点線矢印)は、過去のフレームT−1上で検出された動きベクトルV3を、そのフレームt上の右から5番目のブロックにシフトしたベクトル(すなわち、フレームt−1上において検出された動きベクトルV3の終点のブロックと同じ位置にあるフレームt上のブロックを始点とした、動きベクトルV3と同じ大きさで同じ向きの動きベクトル)であるので、確実に取得することができる。   At this time, in order to detect the motion vector of the fifth block from the left on which the image object of the object O3 passes with the motion vector V3 on the frame t, the initial vector is extracted from the motion of the peripheral blocks. Since the image object of the object O4 passes through the block (the fourth or sixth block from the left) with a motion vector V4 different from that of the image object of the object O3, there is no appropriate motion vector. However, in this case as well, as in the case of FIG. 15, the shifted initial vector SV3 (indicated by a dotted arrow in the figure) represents the motion vector V3 detected on the past frame T-1 as the right on the frame t. To the fifth block (ie, the same size as the motion vector V3, starting from the block on the frame t at the same position as the end block of the motion vector V3 detected on the frame t-1) The motion vectors in the same direction in FIG.

以上のように、図15に示されるような大きな動きを持つ物体や、図16に示されるように動いている物体の境界においては、動きベクトルを検出しようとする着目ブロックの初期ベクトルの候補となる周辺ブロックに、着目ブロックの初期ベクトルとして最適な動きベクトルが存在しない場合が多く存在する。これに対して、シフト初期ベクトルは、過去のフレームt−1上において検出された動きベクトルの終点のブロックと同じ位置にあるフレームt上のブロックを始点とした、動きベクトルと同じ大きさで同じ向きの動きベクトルであるので、ブロック間の空間距離に依存しないため、周辺ブロックに、着目ブロックの初期ベクトルとして適切な動きベクトルが存在しない場合にも、確実に取得することができ、初期ベクトルの最適な候補として用いることができる。   As described above, at the boundary of an object having a large movement as shown in FIG. 15 or an object moving as shown in FIG. There are many cases where the optimal motion vector does not exist as the initial vector of the block of interest in the peripheral block. On the other hand, the initial shift vector has the same size and the same size as the motion vector starting from the block on the frame t at the same position as the end block of the motion vector detected on the past frame t-1. Since it is a motion vector in the direction, it does not depend on the spatial distance between the blocks, so even if there is no appropriate motion vector as the initial vector of the block of interest in the surrounding blocks, it can be obtained reliably. It can be used as an optimal candidate.

ここで、一旦、図14に戻り、シフト初期ベクトルの決定方法について説明する。図14の例において、動きベクトル検出処理を行うフレームt上の着目ブロックBtを基準として、フレームt−1から、着目ブロックBtを通過する動きベクトル(すなわち、フレームt上のブロックBtと同じ位置にあるフレームt−1のブロックを終点とする動きベクトル)を探索しようとすると、フレームt−1上の全ブロックの動きベクトルを検索しなければならず、処理が膨大になってしまう。したがって、この場合、動きベクトル検出時に、膨大な処理分の演算量をこなさなければならず、その実現(ハードウェア化)が困難であった。   Here, returning to FIG. 14, a method for determining the shifted initial vector will be described. In the example of FIG. 14, with reference to the target block Bt on the frame t on which the motion vector detection process is performed, the motion vector passing from the frame t-1 through the target block Bt (that is, at the same position as the block Bt on the frame t). If an attempt is made to search for a motion vector whose end point is a block of a certain frame t-1, the motion vectors of all the blocks on the frame t-1 must be searched, and the processing becomes enormous. Therefore, in this case, when detecting a motion vector, it is necessary to deal with a huge amount of processing, and it is difficult to implement (hardware).

そこで、シフト初期ベクトル割付部105は、フレームt−1における動きベクトル検出の際に、着目ブロックBtにおいて検出された動きベクトルVが、次の時刻のフレームt上で通過するブロックの位置(すなわち、動きベクトルVの終点のブロックと同じ位置のフレームt上のブロック)を求め、その動きベクトルVを、ブロックBtに対するシフト初期ベクトルSVとして、予め割り付けておく。これにより、フレームt上での動きベクトル検出の際に必要となるシフト初期ベクトルを探索する演算量を削減することができ、ハードウェア化が実現できるようになり、現実的に、シフト初期ベクトルを、初期ベクトルの候補として用いることが可能になる。   Therefore, the shifted initial vector allocating unit 105 detects the position of the block through which the motion vector V detected in the block of interest Bt passes on the frame t at the next time (that is, when detecting the motion vector in the frame t−1). A block on the frame t at the same position as the end point block of the motion vector V) is obtained, and the motion vector V is assigned in advance as a shift initial vector SV for the block Bt. As a result, it is possible to reduce the amount of calculation for searching for the initial shift vector necessary for detecting the motion vector on the frame t, and to realize hardware implementation. It can be used as a candidate for an initial vector.

図17を参照して、シフト初期ベクトル割付部105によるシフト初期ベクトルの決定方法を具体的に説明する。図17の例においては、矢印Tは、図中、左手前の時刻t−1のフレームt−1から、右奥の時刻tのフレームtへの時間の経過を示している。また、各フレーム上の丸は、画素を表している。   With reference to FIG. 17, a method for determining the shifted initial vector by shifted initial vector allocating unit 105 will be specifically described. In the example of FIG. 17, the arrow T indicates the passage of time from the frame t-1 at time t-1 on the left front side to the frame t at time t on the right back in the drawing. A circle on each frame represents a pixel.

フレームt−1上において、ブロックB0は、4×4画素により構成される。ブロックB0において検出された動きベクトルVbとすると、ブロックB0をフレームt上にオフセット(動き補償)したオフセット先(ブロックB0の動きベクトルVbの終点のブロックと同じ位置のフレームt上のブロック)A0は、一般的には、フレームt上の4×4画素により構成される4つのブロックBt1乃至Bt4と重なりを持つ。したがって、図17の例の場合においては、このオフセット先A0と重なりを持つ4つのブロックBt1乃至Bt4のすべてが、動きベクトルVbを、シフト初期ベクトルとして割り付ける対象ブロックとされる。   On the frame t−1, the block B0 is composed of 4 × 4 pixels. Assuming that the motion vector Vb detected in the block B0, an offset destination (a block on the frame t at the same position as the end block of the motion vector Vb of the block B0) A0 obtained by offsetting (motion compensation) the block B0 on the frame t is In general, there is an overlap with four blocks Bt1 to Bt4 configured by 4 × 4 pixels on the frame t. Therefore, in the example of FIG. 17, all of the four blocks Bt1 to Bt4 that overlap with the offset destination A0 are set as target blocks to which the motion vector Vb is allocated as the shifted initial vector.

以上のようにして前のフレームにおいて検出された動きベクトルを、シフト初期ベクトルとして割り付ける。この場合、割り付けられる対象となるブロックの位置は、動きベクトルの大きさと向きによる。このため、フレームt−1上で検出される動きベクトルの分布によっては、図18に示されるように、フレームt上において、複数のシフト初期ベクトルが割り付ける対象となり競合するブロックや、逆に、シフト初期ベクトルの割り付けが起こらないブロックが発生してしまう。   The motion vector detected in the previous frame as described above is assigned as the shifted initial vector. In this case, the position of the block to be allocated depends on the magnitude and direction of the motion vector. Therefore, depending on the distribution of motion vectors detected on the frame t−1, as shown in FIG. 18, on the frame t, a block that is a target for allocation of a plurality of shift initial vectors, or conversely, a shift Blocks that do not have an initial vector assignment will occur.

図18は、シフト初期ベクトルの割り付けの例を示している。図18の例において、各フレームの仕切りは、ブロックの境界を示しており、フレームt−1上には、図中左から、ブロックB1乃至B5により構成され、フレームt上には、図中左から、ブロックBt1乃至Bt5が示されている。   FIG. 18 shows an example of allocation of shifted initial vectors. In the example of FIG. 18, the partition of each frame indicates the boundary of the block, and is composed of blocks B1 to B5 on the frame t−1 from the left in the figure, and on the frame t on the left in the figure. Thus, blocks Bt1 to Bt5 are shown.

ブロックB1においては、動きベクトルV1が検出され、ブロックB1のオフセット先A1は、フレームt上のブロックBt1およびBt2と重なりを持つ。ブロックB2においては、動きベクトルV2が検出され、ブロックB2のオフセット先A2は、フレームt上のブロックBt1およびBt2と重なりを持つ。ブロックB3おいては、動きベクトルV3が検出され、ブロックB3のオフセット先A3は、フレームt上のブロックBt4およびBt5と重なりを持つ。ブロックB4においては、動きベクトルV4が検出され、ブロックB4のオフセット先A4は、フレームt上のブロックBt4およびBt5と重なりを持つ。ブロックB5においては、動きベクトルV5が検出され、ブロックB5のオフセット先A5は、フレームt上のブロックBt5および図示せぬ隣接ブロックと重なりを持つ。   In the block B1, the motion vector V1 is detected, and the offset destination A1 of the block B1 overlaps with the blocks Bt1 and Bt2 on the frame t. In block B2, motion vector V2 is detected, and offset destination A2 of block B2 overlaps with blocks Bt1 and Bt2 on frame t. In block B3, motion vector V3 is detected, and offset destination A3 of block B3 overlaps with blocks Bt4 and Bt5 on 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).

すなわち、図18の例においては、フレームt上のブロックBt1およびBt2には、動きベクトルV1またはV2のどちらか一方がシフト初期ベクトルとして割り付けられる。また、フレームt上のブロックBt4には、動きベクトルV3およびV4のどちらか一方がシフト初期ベクトルとして割り付けられ、フレームt上のブロックBt5には、動きベクトルV3、V4、およびV5のうちのいずれかがシフト初期ベクトルとして割り付けられる。しかしながら、フレームt上のブロックBt3には、シフト初期ベクトルの候補となる動きベクトルが存在せず、シフト初期ベクトルは割り付けられない。   That is, in the example of FIG. 18, one of the motion vectors V1 and V2 is allocated as the shifted initial vector to the blocks Bt1 and Bt2 on the frame t. Also, one of the motion vectors V3 and V4 is assigned as the initial shift vector to the block Bt4 on the frame t, 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. 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.

したがって、シフト初期ベクトル割付部105は、ブロックBt3のように、シフト初期ベクトルの割り付けが起こらないブロックに対して、0ベクトルをシフト初期ベクトルとして割り付ける。一方、シフト初期ベクトル割付部105は、ブロックBt1,Bt2,Bt4,およびBt5のように、複数の動きクトルが競合するブロックに対して、上述した評価値DFDに基づく、信頼度が高い動きベクトルを選択し、選択した動きベクトルを、シフト初期ベクトルとしてそれぞれのブロックに割り付ける。   Therefore, the shifted initial vector allocating unit 105 allocates the zero vector as the shifted initial vector to a block such as the block Bt3 where allocation of the shifted initial vector does not occur. On the other hand, the shifted initial vector allocating unit 105 assigns a motion vector having high reliability based on the above-described evaluation value DFD to a block in which a plurality of motion vectors compete, such as the blocks Bt1, Bt2, Bt4, and Bt5. The selected motion vector is assigned to each block as a shifted initial vector.

なお、図18の例においては、説明の便宜上、オフセット先Aは、フレームt上から少しずらして示されている。   In the example of FIG. 18, for convenience of explanation, the offset destination A is shown slightly shifted from the frame t.

図19は、競合する動きベクトルの例を示す図である。図19の例においては、フレームt−1上のブロックB1およびB2から、それぞれにおいて検出された動きベクトルV1およびV2が、フレームt上のブロックBtを通過している。すなわち、ブロックBtは、動きベクトルV1のフレームt−1上の終点と同じ位置のフレームt上のブロックであり、動きベクトルV2のフレームt−1上の終点と同じ位置のフレームt上のブロックである。このように、複数の動きベクトルが同じブロックに対して競合する場合には、動きベクトルV1に対する評価値DFD1と、動きベクトルV2に対する評価値DFD2の値が比較され、評価値DFDが小さい方(すなわち、信頼度が高い方)がブロックBtに対応するシフト初期ベクトルSV2として選択される。これにより、評価値DFDに基づく、信頼度の高いシフト初期ベクトルを得ることができる。   FIG. 19 is a diagram illustrating an example of competing motion vectors. In the example of FIG. 19, the motion vectors V1 and V2 detected in the blocks B1 and B2 on the frame t-1 respectively pass the block Bt on the frame t. That is, the block Bt is a block on the frame t at the same position as the end point on the frame t-1 of the motion vector V1, and is a block on the frame t at the same position as the end point on the frame t-1 of the motion vector V2. is there. Thus, when a plurality of motion vectors compete for the same block, the evaluation value DFD1 for the motion vector V1 is compared with the evaluation value DFD2 for the motion vector V2, and the evaluation value DFD is smaller (that is, , With higher reliability) is selected as the shifted initial vector SV2 corresponding to the block Bt. As a result, a highly reliable shifted initial vector based on the evaluation value DFD can be obtained.

次に、図20のフローチャートを参照して、シフト初期ベクトル割り付け処理の詳細について説明する。前段において、ベクトル評価部104は、フレームt−1上の着目ブロックの動きベクトルVを検出すると、検出された動きベクトルVとともに、その動きベクトルVに対して求めた評価値DFDを、シフト初期ベクトル割付部105に供給する。   Next, the details of the shifted initial vector allocation processing will be described with reference to the flowchart of FIG. In the preceding stage, when the vector evaluation unit 104 detects the motion vector V of the block of interest on the frame t−1, the vector evaluation unit 104 uses the detected motion vector V and the evaluation value DFD obtained for the motion vector V as the shifted initial vector. This is supplied to the allocation unit 105.

ステップS201において、評価値比較部202は、ベクトル評価部104から、動きベクトルVとともに、その動きベクトルVの評価値DFDを入力する。また、このとき、割付対象位置演算部201も、動きベクトルVを入力し、ステップS202に進む。割付対象位置演算部201は、動きベクトルVのフレームtにおけるオフセット(動き補償)先の割付対象ブロックの位置を求める。すなわち、割付対象位置演算部201は、フレームt−1上において検出された動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロックの位置を求め、ステップS203に進む。割付対象位置演算部201は、ステップS203において、求められた割付対象ブロックのうち、1つの割付対象ブロックを選択し、選択した割り付け対象ブロックの位置を、評価値メモリ106およびシフト初期ベクトル置換部203に供給し、ステップS204に進む。なお、ステップS203においては、割付対象ブロックのうち、フレームt上において左上のブロックから順に選択される。   In step S <b> 201, the evaluation value comparison unit 202 inputs the evaluation value DFD of the motion vector V together with the motion vector V from the vector evaluation unit 104. At this time, the allocation target position calculation unit 201 also receives the motion vector V and proceeds to step S202. The allocation target position calculation unit 201 obtains the position of the allocation target block that is the offset (motion compensation) destination of the motion vector V in the frame t. That is, the allocation target position calculation unit 201 obtains the position of the block on the frame t at the same position as the end point block of the motion vector V detected on the frame t−1, and proceeds to step S203. In step S203, the allocation target position calculation unit 201 selects one allocation target block from the obtained allocation target blocks, and sets the position of the selected allocation target block to the evaluation value memory 106 and the shifted initial vector replacement unit 203. To proceed to step S204. In step S203, the blocks to be allocated are selected in order from the upper left block on the frame t.

ステップS204において、評価値比較部202は、評価値メモリ106から、割付対象位置演算部201により選択された割付対象ブロックの評価値DFDを取得し、ステップS205に進み、ステップS201において入力された動きベクトルVの評価値DFDが、評価値メモリ106の評価値DFDよりも小さいか否か(すなわち、動きベクトルVの評価値DFDが、評価値メモリ106の評価値DFDよりも信頼度が高いか否か)を判断し、動きベクトルVの評価値DFDが、評価値メモリ106の評価値DFDよりも小さいと判断された場合、ステップS206に進む。   In step S204, the evaluation value comparison unit 202 acquires the evaluation value DFD of the allocation target block selected by the allocation target position calculation unit 201 from the evaluation value memory 106, proceeds to step S205, and the motion input in step S201. Whether the evaluation value DFD of the vector V is smaller than the evaluation value DFD of the evaluation value memory 106 (that is, whether the evaluation value DFD of the motion vector V is more reliable than the evaluation value DFD of the evaluation value memory 106). If the evaluation value DFD of the motion vector V is determined to be smaller than the evaluation value DFD of the evaluation value memory 106, the process proceeds to step S206.

評価値比較部202は、ステップS206において、シフト初期ベクトル置換部203を制御し、割付対象位置演算部201により選択されたシフト初期ベクトルメモリ107の割付対象ブロックのシフト初期ベクトルを、動きベクトルV(すなわち、動きベクトルVと同じ大きさで同じ向きの動きベクトル)に書き換えさせ、ステップS207に進み、評価値置換部204を制御し、割付対象位置演算部201により選択された割付対象ブロックの評価値DFDを、動きベクトルVの評価値DFDで書き換えさせ、ステップS208に進む。   In step S206, the evaluation value comparison unit 202 controls the shift initial vector replacement unit 203 to determine the shift initial vector of the allocation target block in the shift initial vector memory 107 selected by the allocation target position calculation unit 201 as the motion vector V ( That is, the motion vector V is rewritten to a motion vector having the same magnitude and the same direction as the motion vector V, and the process proceeds to step S207 where the evaluation value replacement unit 204 is controlled and the evaluation value of the allocation target block selected by the allocation target position calculation unit 201 The DFD is rewritten with the evaluation value DFD of the motion vector V, and the process proceeds to step S208.

また、評価値比較部202は、ステップS205において、ステップS201において入力された動きベクトルVの評価値DFDが、評価値メモリ106に記憶される評価値DFDよりも小さくないと判断した場合、ステップS206およびS207の処理をスキップし、ステップS208に進む。すなわち、この場合、評価値メモリ106の評価値DFDが、動きベクトルVの評価値DFDよりも信頼度が高いと判断されるので、評価値メモリ106およびシフト初期ベクトルメモリ107の値は、書き換えられることはない。   If the evaluation value comparison unit 202 determines in step S205 that the evaluation value DFD of the motion vector V input in step S201 is not smaller than the evaluation value DFD stored in the evaluation value memory 106, step S206 is performed. And the process of S207 is skipped and it progresses to step S208. That is, in this case, since the evaluation value DFD of the evaluation value memory 106 is determined to have higher reliability than the evaluation value DFD of the motion vector V, the values of the evaluation value memory 106 and the shifted initial vector memory 107 are rewritten. There is nothing.

割付対象位置演算部201は、ステップS208において、動きベクトルVの割り付け対象ブロックすべての処理が終了したか否かを判断し、割り付け対象ブロックすべての処理が終了していないと判断した場合、ステップS203に戻り、それ以降の処理を繰り返す。また、割付対象位置演算部201は、ステップS208において、動きベクトルVの割り付け対象ブロックすべての処理が終了したと判断した場合、シフト初期ベクトル割付処理を終了する。   In step S208, the allocation target position calculation unit 201 determines whether all the allocation target blocks of the motion vector V have been processed, and if it determines that all the allocation target blocks have not been processed, step S203. Return to and repeat the subsequent processing. If the allocation target position calculation unit 201 determines in step S208 that all the allocation target blocks of the motion vector V have been processed, the shifted initial vector allocation process ends.

なお、初回の処理においては、選択された割付対象ブロックに対応するシフト初期ベクトルが、シフト初期ベクトルメモリ107にまだ記憶されていない。したがって、そのシフト初期ベクトルの評価値DFDが、評価値メモリ106の対応する割付対象ブロックに、まだ記憶されていない場合には、ステップS204において、選択された割付対象ブロックから評価値DFDは、取得されないので、ステップS205においてはYesと判断されることとし、ステップS206およびS207の処理が実行される。   In the first process, the shifted initial vector corresponding to the selected allocation target block is not yet stored in the shifted initial vector memory 107. Therefore, if the evaluation value DFD of the shifted initial vector is not yet stored in the corresponding allocation target block of the evaluation value memory 106, the evaluation value DFD is obtained from the selected allocation target block in step S204. Since it is not carried out, it will be judged as Yes in Step S205 and processing of Steps S206 and S207 will be performed.

以上のように、着目ブロックの動きベクトルの検出を処理する際に、連続するフレーム間において動物体の動き量にはある程度の連続性があり、動き量の変化が小さいことに基づいて、前の時刻(過去)のフレームから、次の時刻のフレームの着目ブロックを通過する動きベクトル(すなわち、過去のフレーム上において検出された動きベクトルVの終点のブロックと同じ位置にある次のフレーム上のブロックを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトル)であるシフト初期ベクトルを、初期ベクトルの候補ベクトルとすることにより、従来のように、周辺ブロックにおいて過去に求められている動きベクトルのみを初期ベクトルの候補ベクトルとする場合よりも、特に、動いている物体の境界においては、勾配法演算の初期値として適切な動きベクトルを与えることができ、これにより、勾配法の演算による動きベクトル検出の精度を向上させることができる。   As described above, when the motion vector detection of the block of interest is processed, the motion amount of the moving object has a certain degree of continuity between successive frames, and the change in the motion amount is small. A motion vector that passes through the target block of the frame at the next time from the frame at the time (past) (that is, a block on the next frame at the same position as the end block of the motion vector V detected on the past frame) As a conventional method, a shift initial vector that is a motion vector having the same magnitude as the motion vector V and having the same direction as a starting point is used as a candidate vector of the initial vector, and thus is obtained in the past in the peripheral block as in the past. Compared to the case where only the motion vector is the candidate vector of the initial vector, especially at the boundary of the moving object, the gradient method It can give an appropriate motion vector as an initial value for calculation, which makes it possible to improve the accuracy of motion vector detection by computation of the gradient method.

また、シフト初期ベクトルを求める際に、前の時刻のフレームにおいて検出された動きベクトルが次の時刻のフレームにおいて通過するブロック(すなわち、フレームt−1上において検出された動きベクトルVの終点のブロックと同じ位置にあるフレームt上のブロック)を求め、次の時刻のフレーム上の着目ブロックにおけるシフト初期ベクトルとして割り付けるようにしたので、着目ブロックを通過する動きベクトルを、前の時刻のフレームの全ブロックの動きベクトルから探索する場合よりも、処理の演算量が削減されるため、膨大な演算量により実現が困難であったハードウェア化を実現することができる。   Further, when the initial shift vector is obtained, the motion vector detected in the frame at the previous time passes in the frame at the next time (that is, the block at the end of the motion vector V detected on the frame t−1). And a motion vector passing through the block of interest is assigned to all the frames of the previous time. Compared to the search from the motion vector of the block, the calculation amount of processing is reduced, so that it is possible to realize hardware that is difficult to realize due to the huge amount of calculation.

次に、初期ベクトル選択部101の構成の詳細について説明する。   Next, details of the configuration of the initial vector selection unit 101 will be described.

図21は、初期ベクトル選択部101の構成を示すブロック図である。図21に構成を示す初期ベクトル選択部101は、前(過去)フレームにおいて検出された動きベクトルや、シフト初期ベクトルなどの候補ベクトル(以下、初期候補ベクトルとも称する)から、信頼度の高い動きベクトルを、初期ベクトルとして選択する処理を行う。初期ベクトル選択部101には、時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1が入力される。   FIG. 21 is a block diagram illustrating a configuration of the initial vector selection unit 101. The initial vector selection unit 101 having the configuration shown in FIG. 21 uses a motion vector with high reliability from a motion vector detected in the previous (past) frame and a candidate vector such as a shifted initial vector (hereinafter also referred to as an initial candidate vector). Is selected as the initial vector. The initial vector selection unit 101 receives the frame t of the image at time t and the frame t + 1 of the image at time t + 1.

候補ベクトル位置演算部251は、フレームtが入力されると、フレームt上の処理の対象となる着目ブロックを選択し、着目ブロックの周辺領域から、着目ブロックの初期候補ベクトルを取得する候補ブロックの位置、初期候補ベクトルとなる動きベクトルの種類および優先順位を求め、求められた優先順位の順に、候補ブロックの位置情報および初期候補ベクトルの種類情報を、検出ベクトル取得部252およびシフト初期ベクトル取得部253に供給する。また、候補ベクトル位置演算部251は、候補ブロックの位置情報を、オフセット位置演算部254にも供給する。   When the frame t is input, the candidate vector position calculation unit 251 selects a target block to be processed on the frame t, and obtains an initial candidate vector of the target block from the peripheral region of the target block. The position, the type of motion vector to be the initial candidate vector and the priority order are obtained, and the position information of the candidate block and the type information of the initial candidate vector are obtained in the order of the obtained priority order, and the detected vector acquisition unit 252 and the shifted initial vector acquisition unit 253. The candidate vector position calculation unit 251 also supplies the position information of the candidate block to the offset position calculation unit 254.

なお、信号処理装置1においては、初期候補ベクトルの数は、初期ベクトルの精度と、ハードウェア能力の兼ね合いなどに基づいて所定数に設定されており、さらに、候補ブロックの位置、初期候補ベクトルの種類、および優先順位も、例えば、図23を参照して後述するように、予め設定されている。また、初期候補ベクトルの種類としては、過去フレームにおいて、所定のブロックを通過する動きベクトルを、その所定のブロックにシフトさせた動きベクトル(すなわち、過去フレーム上において検出された動きベクトルの終点のブロックと同じ位置にある次のフレーム上のブロックを始点とした、動きベクトルVと同じ大きさで同じ向きの動きベクトル)であるシフト初期ベクトルSV、過去フレームにおいて検出された動きベクトル(以下、過去ベクトルPVとも称する)、現在のフレームにおいて着目ブロックより手前のブロックにおいて検出された動きベクトル(現在ベクトルCVとも称する)、および0ベクトルがある。   In the signal processing device 1, the number of initial candidate vectors is set to a predetermined number based on the balance between the accuracy of the initial vector and the hardware capability, and further, the position of the candidate block and the initial candidate vector The type and priority are also set in advance as will be described later with reference to FIG. In addition, as a type of the initial candidate vector, a motion vector obtained by shifting a motion vector passing through a predetermined block in the past frame to the predetermined block (that is, a block at the end point of the motion vector detected on the past frame) A shift initial vector SV, which is a motion vector having the same magnitude and the same direction as the motion vector V, starting from a block on the next frame at the same position, and a motion vector detected in the past frame (hereinafter, past vector) PV), a motion vector detected in a block before the target block in the current frame (also referred to as current vector CV), and a zero vector.

したがって、候補ベクトル位置演算部251は、予め設定された初期候補ベクトルの種類情報が過去ベクトルまたは現在ベクトルであった場合、候補ブロックの位置情報および初期候補ベクトルの種類情報を、検出ベクトル取得部252に供給し、求めた初期候補ベクトルの種類情報がシフト初期ベクトルであった場合、候補ブロックの位置情報および初期候補ベクトルの種類情報を、シフト初期ベクトル取得部253に供給し、そのどちらでもなかった場合(例えば、初期候補ベクトルの種類情報が、0ベクトルである場合)、0ベクトルを設定し、0ベクトルと共に、候補ブロックの位置情報を、オフセット位置演算部254に供給する。   Accordingly, when the preset initial candidate vector type information is a past vector or a current vector, the candidate vector position calculation unit 251 displays the candidate block position information and the initial candidate vector type information as the detected vector acquisition unit 252. If the type information of the obtained initial candidate vector is a shifted initial vector, the position information of the candidate block and the type information of the initial candidate vector are supplied to the shifted initial vector acquisition unit 253, which is neither of them. In the case (for example, when the type information of the initial candidate vector is 0 vector), the 0 vector is set, and the position information of the candidate block is supplied to the offset position calculation unit 254 together with the 0 vector.

検出ベクトル取得部252は、候補ベクトル位置演算部251により供給された候補ブロックの位置情報および初期候補ベクトルの種類情報に応じた動きベクトルを、検出ベクトルメモリ53より取得し、取得した動きベクトルを、初期候補ベクトルとして、オフセット位置演算部254に出力する。   The detection vector acquisition unit 252 acquires 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 251 from the detection vector memory 53, and the acquired motion vector is The initial candidate vector is output to the offset position calculation unit 254.

シフト初期ベクトル取得部253は、候補ベクトル位置演算部251により供給された候補ブロックの位置情報および初期候補ベクトルの種類情報に応じて、候補ブロックの位置情報に対応したシフト初期ベクトルを、シフト初期ベクトルメモリ107から取得し、初期候補ベクトルとしてオフセット位置演算部254に出力する。また、シフト初期ベクトル取得部253は、候補ベクトル位置演算部251により指示されたブロックの位置に、シフト初期ベクトルが割り付けられていない場合、0ベクトルを、オフセット位置演算部254に出力する。なお、シフト初期ベクトルが割り付けられていない場合には、0ベクトルが、シフト初期ベクトルメモリ107に予め記憶されているようにしてもよい。   The shifted initial vector acquisition unit 253 generates the shifted initial vector corresponding to the position information of the candidate block according to the position information of the candidate block and the type information of the initial candidate vector supplied by the candidate vector position calculating unit 251. Obtained from the memory 107 and output to the offset position calculation unit 254 as an initial candidate vector. In addition, the shifted initial vector acquisition unit 253 outputs a zero vector to the offset position calculating unit 254 when the shifted initial vector is not allocated to the position of the block designated by the candidate vector position calculating unit 251. If no shifted initial vector is assigned, the zero vector may be stored in advance in the shifted initial vector memory 107.

オフセット位置演算部254は、検出ベクトル取得部252またはシフト初期ベクトル取得部253から初期候補ベクトル(あるいは候補ベクトル位置演算部251からの0ベクトル)を入力すると、候補ベクトル位置演算部251により供給された候補ブロックの位置情報に基づいて、各初期候補ベクトルに対して、フレームtの着目ブロックを、フレームt+1にオフセット(動き補償)させたオフセット先のブロック位置を演算する。そして、オフセット位置演算部254は、初期候補ベクトルとともに、候補ブロックの位置情報、およびオフセット先ブロック位置の情報を、評価値演算部255に出力する。   When the initial position candidate vector (or 0 vector from the candidate vector position calculation section 251) is input from the detection vector acquisition section 252 or the shifted initial vector acquisition section 253, the offset position calculation section 254 is supplied by the candidate vector position calculation section 251. Based on the position information of the candidate block, an offset destination block position obtained by offsetting (motion compensation) the target block of frame t to frame t + 1 is calculated for each initial candidate vector. Then, the offset position calculation unit 254 outputs the candidate block position information and the offset destination block position information to the evaluation value calculation unit 255 together with the initial candidate vector.

評価値演算部255は、オフセット位置演算部254より初期候補ベクトルとともに、候補ブロックの位置情報、およびオフセット先ブロック位置の情報を入力すると、フレームtとフレームt+1を用いて、初期候補ベクトルの評価値DFDを求める。そして、評価値演算部255は、初期候補ベクトルとともに、求められた評価値DFDを、評価値比較部256に出力する。   When the evaluation value calculation unit 255 inputs the position information of the candidate block and the information of the offset destination block position together with the initial candidate vector from the offset position calculation unit 254, the evaluation value of the initial candidate vector is used using the frame t and the frame t + 1. Find the DFD. Then, the evaluation value calculation unit 255 outputs the obtained evaluation value DFD together with the initial candidate vector to the evaluation value comparison unit 256.

評価値比較部256は、評価値演算部255により入力された評価値DFDと、最適候補格納用レジスタ257に格納されている最適候補ベクトルの評価値DFDを比較し、評価値演算部255により入力された初期候補ベクトルの評価値DFDが、最適候補ベクトルの評価値DFDよりも小さい、すなわち、初期候補ベクトルが最適候補ベクトルよりも信頼度が高いと判断された場合、最適候補格納用レジスタ257の最適候補ベクトルおよびその評価値DFDを、信頼度が高いとされた初期候補ベクトルおよびその評価値DFDで置き換える。そして、最終的に、評価値比較部256は、最適候補格納用レジスタ257を制御し、すべての候補ベクトルの中から、評価値DFDに基づく、信頼度が最も高いと判断された最適候補ベクトルを、初期ベクトルV0として、反復勾配法演算部103に出力させる。   The evaluation value comparison unit 256 compares the evaluation value DFD input by the evaluation value calculation unit 255 with the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 257 and inputs the evaluation value DFD by the evaluation value calculation unit 255. When the evaluation value DFD of the initial candidate vector is smaller than the evaluation value DFD of the optimal candidate vector, that is, when it is determined that the initial candidate vector has higher reliability than the optimal candidate vector, the optimal candidate storage register 257 The optimal candidate vector and its evaluation value DFD are replaced with the initial candidate vector and its evaluation value DFD that are determined to have high reliability. Finally, the evaluation value comparison unit 256 controls the optimum candidate storage register 257 to select the optimum candidate vector determined to have the highest reliability based on the evaluation value DFD from among all candidate vectors. The iterative gradient method computing unit 103 outputs the initial vector V0.

最適候補格納用レジスタ257は、評価値比較部256により評価値DFDが小さい(信頼度が高い)とされた初期候補ベクトルが、最適候補ベクトルとして、その評価値DFDとともに記憶されている。そして、最適候補格納用レジスタ257は、評価値比較部256の制御のもと、最終的に記憶されている最適候補ベクトルを、初期ベクトルV0として、反復勾配法演算部103に出力する。   In the optimum candidate storage register 257, an initial candidate vector whose evaluation value DFD is made small (high reliability) by the evaluation value comparison unit 256 is stored as an optimum candidate vector together with the evaluation value DFD. Then, under the control of the evaluation value comparison unit 256, the optimal candidate storage register 257 outputs the finally stored optimal candidate vector to the iterative gradient method computing unit 103 as the initial vector V0.

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

動きベクトル検出処理は、上述したように、フレームの左上のブロックからラスタスキャン順に実行される。したがって、初期ベクトル選択部101は、現在フレームtの着目ブロックBtの動きベクトル検出処理の際には、その直前のブロックまでの動きベクトル検出の結果を、初期ベクトルの候補とすることができる。   As described above, the motion vector detection process is executed in the raster scan order from the upper left block of the frame. Therefore, the initial vector selection unit 101 can use the result of motion vector detection up to the immediately preceding block as an initial vector candidate in the motion vector detection processing of the block Bt of interest in the current frame t.

すなわち、着目ブロックBtの周辺領域は、着目ブロックBtよりも手前に処理されるブロックCVB、および着目ブロックBtよりも後に処理されるブロックPVBにより構成されている。したがって、着目ブロックBtの初期ベクトルを求める場合、初期候補ベクトルは、ブロックCVBの現在フレームt上で検出された動きベクトル(現在ベクトルCV)、および、ブロックPVBの過去フレームt−1上で検出された動きベクトル(過去ベクトルPV)の中から選択することができる。なお、このとき、同じ周辺領域のブロックに割り付けられるシフト初期ベクトルも、初期候補ベクトルの候補となりうる。   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 vectors (past vectors PV) can be selected. At this time, a shifted initial vector assigned to a block in the same peripheral area can also be a candidate for an initial candidate vector.

図23は、候補ベクトル位置演算部251において設定される初期ベクトルの候補ブロックの例を示している。図23の例においては、着目ブロックBtの周辺領域のうち、「英字/数字」のシンボルがそれぞれ示されている8個の所定のブロックが、初期候補ベクトルが取得される候補ブロックとして設定されている。これらの8個の所定のブロックに示されている斜線の前後のシンボルは、「初期候補ベクトルの種類」と「優先順位」をそれぞれ表している。なお、初期候補ベクトルの種類のうち、Pは、過去フレームt−1で検出された過去ベクトルPVを表しており、Cは、現在フレームtで検出された現在ベクトルを表しており、Sは、シフト初期ベクトルSVを表している。   FIG. 23 illustrates an example of initial vector candidate blocks set in the candidate vector position calculation unit 251. In the example of FIG. 23, eight predetermined blocks each having an “alphabet / number” symbol are set as candidate blocks from which an initial candidate vector is acquired in the peripheral area of the block of interest Bt. Yes. The symbols before and after the hatched lines shown in these eight predetermined 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, C represents the current vector detected in the current frame t, and S is The shifted initial vector SV is represented.

着目ブロックBtの「S/1」は、着目ブロックBtに割り付けられたシフト初期ベクトルSVが初期候補ベクトルとして、優先順位「1」番目に用いられることを表している。着目ブロックBtの左隣のブロックの「C/2」は、現在フレームtにおいて検出されたそのブロックの現在ベクトルCVが初期候補ベクトルとして、優先順位「2」番目に用いられることを表している。着目ブロックBtの右上のブロックの「C/3」は、現在フレームtにおいて検出されたそのブロックの現在ベクトルCVが、優先順位「3」番目に初期候補ベクトルとして用いられることを表している。着目ブロックBtの右下のブロックの「P/4」は、過去フレームt−1において検出されたそのブロックの過去ベクトルPVが、優先順位「4」番目に初期候補ベクトルとして用いられることを表している。   “S / 1” of the target block Bt indicates that the shifted initial vector SV assigned to the target block Bt is used as the initial candidate vector in the priority “1”. “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 as the initial candidate vector in the “2” priority order. “C / 3” in the upper right block of the block of interest Bt indicates that the current vector CV of the block detected in the current frame t is used as the initial candidate vector with the priority “3”. “P / 4” in the lower right block of the target block Bt indicates that the past vector PV of the block detected in the past frame t−1 is used as the initial candidate vector with the priority “4”. Yes.

周辺領域7×7の左上隅の右下のブロックの「C/6」は、現在フレームtにおいて検出されたそのブロックの現在ベクトルCVが、優先順位「6」番目に初期候補ベクトルとして用いられることを表している。周辺領域7×7の右上隅の左下のブロックの「C/5」は、現在フレームtにおいて検出されたそのブロックの現在ベクトルCVが、優先順位「5」番目に初期候補ベクトルとして用いられることを表している。周辺領域7×7の左下隅の右上のブロックの「P/7」は、過去フレームt−1において検出されたそのブロックの過去ベクトルPVが、優先順位「7」番目に初期候補ベクトルとして用いられることを表している。周辺領域7×7の右下隅の左上のブロックの「P/8」は、過去フレームt−1において検出されたそのブロックの過去ベクトルPVが、優先順位「8」番目に初期候補ベクトルとして用いられることを表している。   As for “C / 6” of the lower right block at the upper left corner of the peripheral area 7 × 7, the current vector CV of the block detected in the current frame t is used as the initial candidate vector with the priority “6”. Represents. “C / 5” of the lower left block in the upper right corner of the peripheral area 7 × 7 indicates that the current vector CV of the block detected in the current frame t is used as the initial candidate vector with the priority “5”. Represents. For the upper right block “P / 7” in the lower left corner of the peripheral area 7 × 7, the past vector PV of the block detected in the past frame t−1 is used as the initial candidate vector with the priority “7”. Represents that. In the upper left block “P / 8” in the lower right corner of the peripheral area 7 × 7, the past vector PV of the block detected in the past frame t−1 is used as the initial candidate vector with the priority “8”. Represents that.

以上のように、図23の例において、初期候補ベクトルは、着目ブロックBtを含む、着目ブロックBtに隣接するブロックのうち、着目ブロックBt、着目ブロックBtの左隣、右上、および右下のブロックとされ、着目ブロックBtに隣接していないブロックのうち、周辺領域7×7の四隅から、それぞれ内側に1つ入った位置のブロックから選択される。   As described above, in the example of FIG. 23, the initial candidate vectors include the block of interest Bt, the block adjacent to the block of interest Bt, the block next to the block of interest Bt, the block adjacent to the left of the block of interest Bt, the upper right, and the lower right. Among the blocks that are not adjacent to the block of interest Bt, the block is selected from the blocks at positions one inside each from the four corners of the peripheral area 7 × 7.

すなわち、図23の例の場合、着目ブロックBtに隣接するブロック(空間的にも時間的にも近いブロック)のほうが少し離れたブロックよりも優先順位が高く、現在フレームtで検出された現在ベクトルのほうが、過去フレームt−1で検出された過去ベクトルよりも優先順位が高く設定されている。なお、これらの初期ベクトルの候補の位置、種類、および優先度は、できるだけ少ない候補数で、確かな初期候補ベクトルを得ることができるように、着目ブロックBtの近傍だけでなく、少し離れた位置のブロックも含め、また、偏りのないようになど、空間的な相関や時間的な相関などに基づいて設定されたものである。したがって、このように、予め設定された所定のブロックの動きベクトルを初期候補ベクトルとして用いることにより、初期候補ベクトル数が多くなってしまい、処理の演算量が膨大になってしまうことが抑制される。   That is, in the case of the example in FIG. 23, a block adjacent to the block of interest Bt (a block that is spatially and temporally close) has a higher priority than a block slightly apart, and the current vector detected in the current frame t. The priority is set higher than the past vector detected in the past frame t-1. Note that the positions, types, and priorities of these initial vector candidates are not only in the vicinity of the block of interest Bt but also slightly apart so that a reliable initial candidate vector can be obtained with as few candidates as possible. These blocks are set on the basis of spatial correlation and temporal correlation so that there is no bias. Therefore, using the motion vector of a predetermined block set in advance as an initial candidate vector in this way prevents the number of initial candidate vectors from increasing and the amount of computation of processing from becoming enormous. .

なお、候補ブロックの種類と候補ブロックの位置は、図23の例に限定されるものではなく、他の種類のベクトルや、ブロックの位置を用いてもよい。また、周辺のブロックに、最適なベクトルが存在しない場合を考慮して、そのような場合に劣化を抑制する、0ベクトルを用いてもよい。また、候補ブロックの数も8個より多くても少なくてもよい。   Note that the types of candidate blocks and the positions of the candidate blocks are not limited to the example of FIG. 23, and other types of vectors and block positions may be used. In consideration of the case where the optimum vector does not exist in the peripheral blocks, a zero vector that suppresses deterioration in such a case may be used. Also, the number of candidate blocks may be more or less than eight.

次に、図24のフローチャートを参照して、初期ベクトル選択処理の詳細について説明する。   Next, the details of the initial vector selection process will be described with reference to the flowchart of FIG.

候補ベクトル位置演算部251は、ステップS251において、選択された着目ブロックの周辺領域から、予め設定されている着目ブロックの初期候補ベクトルを取得する候補ブロックの位置、初期候補ベクトルの種類および優先順位を求め、ステップS252において、求められた優先順位の順に、候補ブロックの初期候補ベクトルの種類が、過去ベクトルまたは現在ベクトルであるか否かを判断する。ステップS252において、候補ベクトル位置演算部251は、候補ブロックの初期候補ベクトルの種類が、過去ベクトルまたは現在ベクトルであると判断した場合、ステップS253に進み、候補ブロックの位置情報および初期候補ベクトルの種類情報を、検出ベクトル取得部252に供給し、検出ベクトル取得部252に、候補ブロックの位置情報および初期候補ベクトルの種類情報に応じた動きベクトル(過去ベクトルPVまたは現在ベクトルCV)を、検出ベクトルメモリ53から取得させ、取得させた動きベクトルを、オフセット位置演算部254に出力させ、ステップS257に進む。   In step S251, the candidate vector position calculation unit 251 determines the position of the candidate block, the type of the initial candidate vector, and the priority order from which the initial candidate vector of the target block set in advance is acquired from the peripheral area of the selected target block. In step S252, it is determined 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 the obtained priority. In step S252, when the candidate vector position calculation unit 251 determines that the type of the initial candidate vector of the candidate block is the past vector or the current vector, the process proceeds to step S253, where the candidate block position information and the type of initial candidate vector are determined. Information is supplied to the detection vector acquisition unit 252, and the motion vector (past vector PV or current vector CV) according to the position information of the candidate block and the type information of the initial candidate vector is detected in the detection vector memory. 53, the acquired motion vector is output to the offset position calculation unit 254, and the process proceeds to step S257.

ステップS252において、候補ベクトル位置演算部251は、候補ブロックの初期候補ベクトルの種類が、過去ベクトルまたは現在ベクトルでないと判断した場合、ステップS254に進み、候補ベクトル位置演算部251は、候補ブロックの初期候補ベクトルの種類が、シフト初期ベクトルであるか否かを判断する。ステップS254において、候補ベクトル位置演算部251は、候補ブロックの初期候補ベクトルの種類が、シフト初期ベクトルであると判断した場合、ステップS255に進み、候補ブロックの位置情報および初期候補ベクトルの種類情報を、シフト初期ベクトル取得部253に供給し、シフト初期ベクトル取得部253に、候補ブロックの位置情報に対応したシフト初期ベクトルを、シフト初期ベクトルメモリ107から取得させ、取得させたシフト初期ベクトルを、オフセット位置演算部254に出力させ、ステップS257に進む。   In step S252, when the candidate vector position calculation unit 251 determines that the type of the initial candidate vector of the candidate block is not a past vector or a current vector, the process proceeds to step S254, where the candidate vector position calculation unit 251 It is determined whether or not the type of candidate vector is a shifted initial vector. In step S254, if the candidate vector position calculation unit 251 determines that the type of the initial candidate vector of the candidate block is a shifted initial vector, the process proceeds to step S255, where the candidate block position information and the initial candidate vector type information are obtained. The shifted initial vector acquisition unit 253 supplies the shifted initial vector acquisition unit 253 with the shifted initial vector corresponding to the position information of the candidate block from the shifted initial vector memory 107, and the acquired shifted initial vector is offset. The position calculation unit 254 is output, and the process proceeds to step S257.

ステップS254において、候補ベクトル位置演算部251は、候補ブロックの初期候補ベクトルの種類が、シフト初期ベクトルではないと判断した場合(すなわち、候補ブロックの初期候補ベクトルの種類が、0ベクトルであると判断した場合)、ステップS256に進み、初期候補ベクトルに0ベクトルを設定し、0ベクトルと共に、候補ブロックの位置情報を、オフセット位置演算部254に供給し、ステップS257に進む。なお、ステップS253およびS255においても、候補ベクトル位置演算部251は、候補ブロックの位置情報を、オフセット位置演算部254に供給している。 In step S254, when the candidate vector position calculation unit 251 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). In step S256, a zero vector is set as the initial candidate vector, and the position information of the candidate block is supplied to the offset position calculation unit 254 together with the zero vector, and the process proceeds to step S257. Also in steps S253 and S255, the candidate vector position calculation unit 251 supplies the position information of the candidate block to the offset position calculation unit 254.

オフセット位置演算部254は、ステップS257において、検出ベクトル取得部252またはシフト初期ベクトル取得部253から初期候補ベクトルを入力すると、候補ベクトル位置演算部251により供給された候補ブロックの位置情報に基づいて、各初期候補ベクトルに対して、フレームtの着目ブロックを、フレームt+1にオフセットさせたオフセット先のブロック位置を演算する。そして、オフセット位置演算部254は、初期候補ベクトルとともに、候補ブロックの位置情報、およびオフセット先ブロック位置の情報を、評価値演算部255に出力し、ステップS258に進む。   In step S257, the offset position calculation unit 254 receives the initial candidate vector from the detection vector acquisition unit 252 or the shifted initial vector acquisition unit 253, and based on the position information of the candidate block supplied by the candidate vector position calculation unit 251, For each initial candidate vector, an offset destination block position obtained by offsetting the target block of frame t to frame t + 1 is calculated. Then, the offset position calculation unit 254 outputs the position information of the candidate block and the information of the offset destination block position together with the initial candidate vector to the evaluation value calculation unit 255, and proceeds to step S258.

評価値演算部255は、オフセット位置演算部254より初期候補ベクトルとともに、候補ブロックの位置情報、およびオフセット先ブロック位置の情報を入力すると、ステップS258において、フレームtとフレームt+1を用いて、初期候補ベクトルの評価値DFDを求め、初期候補ベクトルとともに、求められた評価値DFDを、評価値比較部256に出力し、S259に進む。   When the evaluation value calculation unit 255 inputs the position information of the candidate block and the information of the offset destination block position together with the initial candidate vector from the offset position calculation unit 254, in step S258, using the frame t and the frame t + 1, the initial candidate An evaluation value DFD of the vector is obtained, and the obtained evaluation value DFD is output to the evaluation value comparison unit 256 together with the initial candidate vector, and the process proceeds to S259.

評価値比較部256は、ステップS259において、評価値演算部255により求められた評価値DFDが、最適候補格納用レジスタ257に格納されている最適候補ベクトルの評価値DFDより小さいか否かを判断し、評価値演算部255により求められた評価値DFDが、最適候補格納用レジスタ257に格納されている最適候補ベクトルの評価値DFDより小さい、すなわち、初期候補ベクトルが最適候補ベクトルよりも信頼度が高いと判断された場合、ステップS260において、最適候補格納用レジスタ257の最適候補ベクトルおよびその評価値DFDを、信頼度が高いとされた初期候補ベクトルおよびその評価値DFDで書き換え、ステップS261に進む。   In step S259, the evaluation value comparison unit 256 determines whether or not the evaluation value DFD obtained by the evaluation value calculation unit 255 is smaller than the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 257. The evaluation value DFD obtained by the evaluation value calculator 255 is smaller than the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 257, that is, the initial candidate vector is more reliable than the optimal candidate vector. Is determined to be high, in step S260, the optimal candidate vector of the optimal candidate storage register 257 and its evaluation value DFD are rewritten with the initial candidate vector and its evaluation value DFD that are determined to have high reliability, and the process returns to step S261. move on.

また、ステップS259において、評価値比較部256は、評価値演算部255により求められた評価値DFDが、最適候補格納用レジスタ257に格納されている最適候補ベクトルの評価値DFDより小さくないと判断した場合、ステップS260の処理をスキップし、ステップS261に進む。   In step S259, the evaluation value comparison unit 256 determines that the evaluation value DFD obtained by the evaluation value calculation unit 255 is not smaller than the evaluation value DFD of the optimal candidate vector stored in the optimal candidate storage register 257. If so, the process of step S260 is skipped, and the process proceeds to step S261.

ステップS261において、候補ベクトル位置演算部251は、すべての初期候補ベクトル(図23の例の場合、8ベクトル)の処理が終了したか否かを判断し、すべての初期候補ベクトルの処理が終了していないと判断した場合、ステップS252に戻り、それ以降の処理を繰り返す。   In step S261, the candidate vector position calculation unit 251 determines whether all the initial candidate vectors (eight vectors in the example of FIG. 23) have been processed, and all the initial candidate vectors have been processed. If it is determined that it is not, the process returns to step S252 and the subsequent processing is repeated.

ステップS261において、すべての初期候補ベクトルの処理が終了したと判断された場合、処理は、ステップS262に進み、評価値比較部256は、最適候補格納用レジスタ257を制御し、すべての初期候補ベクトルの中から、評価値DFDに基づく、信頼度が最も高いとされた最適候補ベクトルを、初期ベクトルV0として反復勾配法演算部103に出力させ、初期ベクトル選択処理を終了する。   When it is determined in step S261 that all the initial candidate vectors have been processed, the process proceeds to step S262, and the evaluation value comparison unit 256 controls the optimal candidate storage register 257 to control all the initial candidate vectors. The optimal candidate vector having the highest reliability based on the evaluation value DFD is output to the iterative gradient method computing unit 103 as the initial vector V0, and the initial vector selection process is terminated.

以上のように、着目ブロックにおいて、複数の初期候補ベクトルの評価値DFDを求め、評価値DFDが最も小さい、すなわち、信頼度が最も高いとされる初期候補ベクトルを、初期ベクトルとして選択するようにしたので、後段の動きベクトル検出に最適な初期ベクトルを与えることができ、その結果、後段の動きベクトル検出の精度を向上させることができる。また、予め定められた所定のブロックの動きベクトルを、初期候補ベクトルとして用いるようにしたので、初期候補ベクトル数が多くなってしまい、処理の演算量が膨大になってしまうことが抑制される。   As described above, in the target block, 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. Therefore, it is possible to provide an optimal initial vector for the subsequent motion vector detection, and as a result, it is possible to improve the accuracy of the subsequent motion vector detection. In addition, since a predetermined motion vector of a predetermined block is used as an initial candidate vector, the number of initial candidate vectors is increased, and the amount of calculation of processing is suppressed from becoming enormous.

さらに、連続するフレーム間において動物体の動き量にはある程度の連続性があり、動き量の変化が小さいことに基づいて、前フレームから着目ブロックを通過する動きベクトルであるシフト初期ベクトルを、初期ベクトルの候補とするようにしたので、従来のように、周辺ブロックにおいて過去に求められている動きベクトルのみを初期ベクトルの候補とする場合よりも、精度の高い動き検出を行うことができる。これは、特に、動いている物体の境界において、効果的である。   Furthermore, based on the fact that 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, an initial shift vector that is a motion vector that passes through the block of interest from the previous frame Since the vector candidates are used, it is possible to perform motion detection with higher accuracy than in the case where only the motion vectors obtained in the past in the peripheral blocks are used as the initial vector candidates. This is particularly effective at the boundaries of moving objects.

次に、反復勾配法演算部103の構成の詳細について説明する。   Next, details of the configuration of the iterative gradient method computing unit 103 will be described.

図25は、反復勾配法演算部103の構成を示すブロック図である。図25に構成を示す反復勾配法演算部103は、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、最適な動きベクトルを検出する処理を行う。この動きベクトルを検出する処理は、複数の画素からなる所定のブロック毎に実行される処理であり、反復勾配法演算部103は、各ブロックにおいて、ブロック単位毎、または、画素単位毎に、勾配法を用いた演算を繰り返し実行することにより、評価値DFDに基づく、信頼度が高い、最適な動きベクトルを出力する。   FIG. 25 is a block diagram showing a configuration of the iterative gradient method computing unit 103. The iterative gradient method computing unit 103 having the configuration shown in FIG. 25 performs processing for detecting an optimal motion vector using the frame t of the image at time t and the frame t + 1 of the image at time t + 1. The process of detecting the motion vector is a process executed for each predetermined block composed of a plurality of pixels, and the iterative gradient method computing unit 103 performs gradients for each block or for each pixel in each block. By repeatedly executing the calculation using the method, an optimal motion vector with high reliability based on the evaluation value DFD is output.

反復勾配法演算部103には、プリフィルタ102−1および102−2を介して、時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1が入力され、また、初期ベクトル選択部102からの初期ベクトルV0が入力される。   The iterative gradient method computing unit 103 receives the frame t of the image at time t and the frame t + 1 of the image at time t + 1 via the pre-filters 102-1 and 102-2. The initial vector V0 is input.

モード選択部401は、有効画素判定部403からの制御のもと、所定のブロック毎に、勾配法演算の処理モードを選択し、初期ベクトル選択部102からの初期ベクトルV0をセレクタ402およびベクトル評価部104に出力する。勾配法演算の処理モードは、動きベクトルの検出対象がブロックであるブロック単位処理モードと、動きベクトルの検出対象が画素である画素単位処理モードにより構成され、初期値としてブロック単位処理モードが選択される。セレクタ402は、ベクトル評価部104からの制御のもと、モード選択部401からの初期ベクトルV0、または勾配法演算部404から出力された動きベクトルVnのどちらかを、勾配法演算の初期値として用いる動きベクトル(以下、オフセットベクトルと称する)として、有効画素判定部403および勾配法演算部404に出力する。   The mode selection unit 401 selects a gradient method calculation processing mode for each predetermined block under the control of the effective pixel determination unit 403, and selects the initial vector V0 from the initial vector selection unit 102 with the selector 402 and the vector evaluation. Output to the unit 104. The gradient method processing mode consists of a block unit processing mode in which the motion vector detection target is a block and a pixel unit processing mode in which the motion vector detection target is a pixel, and the block unit processing mode is selected as an initial value. The Under the control from the vector evaluation unit 104, the selector 402 uses either the initial vector V0 from the mode selection unit 401 or the motion vector Vn output from the gradient method calculation unit 404 as an initial value of the gradient method calculation. The motion vector to be used (hereinafter referred to as an offset vector) is output to the effective pixel determination unit 403 and the gradient method calculation unit 404.

有効画素判定部403は、セレクタ402により選択されたオフセットベクトルを入力すると、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、オフセットベクトルをオフセットして計算した位置を開始点として、各単位処理モードの演算ブロックに、勾配法の演算に有効な画素の数がしきい値より多いか否かを判断し、その結果に応じて処理方法を切り換える。すなわち、有効画素判定部403は、勾配法の演算に有効な画素の数がしきい値以下であると判断した場合、モード選択部401を制御し、その所定のブロックに対しての処理モードを、画素単位処理モードに変更させたり、演算を中止させる。有効画素判定部403は、各単位処理モードの演算ブロックに、勾配法の演算に有効な画素の数がしきい値より多いと判断した場合、勾配法演算部404を制御し、各処理単位での勾配法演算処理を実行させる。   When the effective pixel determination unit 403 receives the offset vector selected by the selector 402, the frame t of the image at time t and the frame t + 1 of the image at time t + 1 input via the pre-filters 102-1 and 102-2. , Using the position calculated by offsetting the offset vector as a starting point, it is determined whether or not the number of pixels effective for the calculation of the gradient method is greater than the threshold in the calculation block of each unit processing mode, The processing method is switched according to the result. That is, when the effective pixel determination unit 403 determines that the number of pixels effective for the calculation of the gradient method is equal to or less than the threshold value, the effective pixel determination unit 403 controls the mode selection unit 401 and sets the processing mode for the predetermined block. Then, change to the pixel unit processing mode or stop the calculation. When the effective pixel determination unit 403 determines that the number of pixels effective for gradient method calculation is greater than the threshold value in the calculation block of each unit processing mode, the effective pixel determination unit 403 controls the gradient method calculation unit 404 to The gradient method calculation process is executed.

勾配法演算部404は、セレクタ402から入力されたオフセットベクトルを入力すると、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、セレクタ402からのオフセットベクトルをオフセットして計算した位置を開始点として、各単位処理モードの勾配法演算を実行し、算出された動きベクトルVnを、遅延部405およびベクトル評価部104に出力する。   When the gradient vector calculation unit 404 receives the offset vector input from the selector 402, the frame t of the image at time t and the frame t + 1 of the image at time t + 1 input via the prefilters 102-1 and 102-2. Using the offset vector from the selector 402 as a starting point, the gradient method calculation of each unit processing mode is executed, and the calculated motion vector Vn is used as the delay unit 405 and the vector evaluation unit 104. Output to.

遅延部405は、勾配法演算部404から出力された動きベクトルVnを、有効画素判定部403および勾配法演算部404の次の処理のサイクルまで保持しており、セレクタ402の制御に応じて、保持する動きベクトルVnを有効画素判定部403に出力する。   The delay unit 405 holds the motion vector Vn output from the gradient method calculation unit 404 until the next processing cycle of the effective pixel determination unit 403 and the gradient method calculation unit 404, and according to the control of the selector 402, The held motion vector Vn is output to the effective pixel determination unit 403.

図26は、有効画素判定部403の詳細な構成を示すブロック図である。図26の例において、有効画素判定部403は、時間画素差分算出部411、画素差分値判定部412、有効画素カウンタ413、および勾配法継続判定部414により構成される。   FIG. 26 is a block diagram illustrating a detailed configuration of the effective pixel determination unit 403. In the example of FIG. 26, the effective pixel determination unit 403 includes a temporal pixel difference calculation unit 411, a pixel difference value determination unit 412, an effective pixel counter 413, and a gradient method continuation determination unit 414.

時間画素差分算出部411は、セレクタ402により選択されたオフセットベクトルを入力すると、ブロック単位の演算ブロックにおいて、画素を選択し、オフセットベクトル、並びに、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームt、および時刻t+1の画像のフレームt+1を用いて、選択された画素の時間方向の画素差分Δtを算出し、算出された時間方向の画素差分Δtを、画素差分値判定部412に出力する。   When the offset vector selected by the selector 402 is input, the temporal pixel difference calculation unit 411 selects a pixel in an arithmetic block in units of blocks, and inputs the offset vector and the pre-filters 102-1 and 102-2. The pixel difference Δt in the time direction of the selected pixel is calculated using the frame t of the image at time t and the frame t + 1 of the image at time t + 1, and the calculated pixel difference Δt in the time direction is calculated as the pixel difference. The data is output to the value determination unit 412.

画素差分値判定部412は、時間画素差分算出部411により算出された時間方向の画素差分Δtが、所定のしきい値(以下、画素差分値と称する)よりも小さいか否かを判断し、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断した場合には、有効画素数カウンタ413の有効画素の数を1つカウントする。有効画素数カウンタ413は、演算ブロック毎に画素差分値判定部412により有効であると判断された画素分の値をカウントする。また、有効画素数カウンタ413は、演算ブロック毎に値がリセットされる。   The pixel difference value determination unit 412 determines whether or not the pixel difference Δt in the time direction calculated by the time pixel difference calculation unit 411 is smaller than a predetermined threshold (hereinafter referred to as a pixel difference value). When it is determined that the pixel difference Δt in the time direction is smaller than the predetermined pixel difference value, the number of effective pixels of the effective pixel number counter 413 is counted by one. The effective pixel number counter 413 counts the value of pixels determined to be effective by the pixel difference value determination unit 412 for each calculation block. The value of the effective pixel number counter 413 is reset for each calculation block.

勾配法継続判定部414は、各単位処理モードの演算ブロックに、勾配法の演算に有効な画素の数がしきい値より多いか否かを判断し、各単位処理モードの演算ブロックに、勾配法の演算に有効な画素の数がしきい値より多いと判断した場合、勾配法演算部404に、各単位処理モードの勾配法演算を実行させるフラグ(flg=1)を出力する。勾配法継続判定部414は、各単位処理モードの演算ブロックに、勾配法の演算に有効な画素の数がしきい値より少ないと判断した場合、モード選択部401を制御し、他の単位処理モードを選択させたり、勾配法演算部404に勾配法演算を打ち切るフラグ(flg=0)を出力する。   The gradient method continuation determination unit 414 determines whether or not the number of effective pixels for the gradient method calculation is greater than a threshold value in each unit processing mode calculation block, and the unit processing mode calculation block includes a gradient. If it is determined that the number of pixels effective for the arithmetic operation is greater than the threshold value, a flag (flg = 1) that causes the gradient operation unit 404 to execute the gradient operation for each unit processing mode is output. If the gradient method continuation determination unit 414 determines that the number of pixels effective for gradient method calculation is less than the threshold in the calculation block of each unit processing mode, the gradient method continuation determination unit 414 controls the mode selection unit 401 to perform other unit processing. A mode is selected, or a flag (flg = 0) for stopping the gradient method calculation is output to the gradient method calculation unit 404.

図27は、勾配法演算部404の詳細な構成を示すブロック図である。図27の例において、勾配法演算部404は、時間画素差分算出部421、画素差分値判定部422、水平垂直画素差分算出部423、勾配積算部424、およびベクトル算出部425により構成される。   FIG. 27 is a block diagram showing a detailed configuration of the gradient method computing unit 404. In the example of FIG. 27, the gradient method calculation unit 404 includes a time pixel difference calculation unit 421, a pixel difference value determination unit 422, a horizontal / vertical pixel difference calculation unit 423, a gradient integration unit 424, and a vector calculation unit 425.

時間画素差分算出部421は、有効画素判定部403から入力されるフラグに基づいて、勾配法演算部404の各部を制御する。すなわち、時間画素差分算出部421は、フラグが1を示す(flg=1)場合には、勾配法演算部404の各部に、勾配法演算の処理を実行させる。具体的には、時間画素差分算出部421は、有効画素判定部403からフラグを入力すると、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、セレクタ402からのオフセットベクトルをオフセットして計算した画素を中心とした、各単位処理モードの演算ブロック内の画素を選択し、選択された画素の時間方向の画素差分Δtを算出し、算出された時間方向の画素差分Δtおよびオフセットベクトルを、画素差分値判定部422に出力する。また、時間画素差分算出部421は、演算ブロック内の画素の処理が終了した場合に、オフセットベクトルを、ベクトル算出部425に出力し、ベクトル算出部425を制御し、検出対象ブロックの動きベクトルを算出させる。   The temporal pixel difference calculation unit 421 controls each unit of the gradient method calculation unit 404 based on the flag input from the effective pixel determination unit 403. In other words, when the flag indicates 1 (flg = 1), the temporal pixel difference calculation unit 421 causes each unit of the gradient method calculation unit 404 to execute gradient method calculation processing. Specifically, when the time pixel difference calculation unit 421 receives a flag from the effective pixel determination unit 403, the frame t of the image at time t input via the prefilters 102-1 and 102-2, and the time t + 1 The pixel in the calculation block of each unit processing mode is selected around the pixel calculated by offsetting the offset vector from the selector 402 using the frame t + 1 of the image of the selected pixel, and the pixel in the time direction of the selected pixel is selected. The difference Δt is calculated, and the calculated pixel difference Δt and offset vector in the time direction are output to the pixel difference value determination unit 422. Also, the time pixel difference calculation unit 421 outputs the offset vector to the vector calculation unit 425 when the processing of the pixels in the calculation block is completed, and controls the vector calculation unit 425 to obtain the motion vector of the detection target block. Let it be calculated.

一方、フラグが0を示す(flg=0)場合には、時間画素差分算出部421は、演算ブロック内の画素の時間方向の画素差分Δtを算出しないので、勾配法演算部404の各部では、勾配法演算の処理が実行されず、処理は打ち切られる。なお、このとき、時間画素差分算出部421は、ベクトル算出部425を制御し、動きベクトルVを0ベクトルに設定させる。   On the other hand, when the flag indicates 0 (flg = 0), the time pixel difference calculation unit 421 does not calculate the pixel difference Δt in the time direction of the pixels in the calculation block. The gradient method calculation process is not executed, and the process is terminated. At this time, the temporal pixel difference calculation unit 421 controls the vector calculation unit 425 to set the motion vector V to 0 vector.

画素差分値判定部422は、時間画素差分算出部421により算出された時間方向の画素差分Δtが、所定のしきい値(以下、画素差分値と称する)よりも小さいか否かを判断し、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断した場合、その画素を、勾配法の演算対象とし、時間方向の画素差分Δtおよびオフセットベクトルを水平垂直画素差分算出部423に出力する。すなわち、所定の画素差分値よりも小さいと判断された画素差分Δtの画素は、水平垂直画素差分算出部423および勾配積算部424において、演算対象とされる。また、画素差分値判定部422は、時間方向の画素差分Δtが、所定の画素差分値以上であると判断した場合、水平垂直画素差分算出部423および勾配積算部424に、その画素の処理を禁止させる。   The pixel difference value determination unit 422 determines whether or not the pixel difference Δt in the time direction calculated by the time pixel difference calculation unit 421 is smaller than a predetermined threshold (hereinafter referred to as a pixel difference value). When it is determined that the pixel difference Δt in the time direction is smaller than the predetermined pixel difference value, the pixel is subjected to the gradient method calculation, and the pixel difference Δt in the time direction and the offset vector are input to the horizontal / vertical pixel difference calculation unit 423. Output. That is, the pixel of the pixel difference Δt determined to be smaller than the predetermined pixel difference value is set as a calculation target in the horizontal / vertical pixel difference calculation unit 423 and the gradient integration unit 424. In addition, when the pixel difference value determination unit 422 determines that the pixel difference Δt in the time direction is equal to or greater than a predetermined pixel difference value, the pixel difference value determination unit 422 causes the horizontal / vertical pixel difference calculation unit 423 and the gradient integration unit 424 to process the pixel. Prohibit.

水平垂直画素差分算出部423は、画素差分値判定部422から入力されたオフセットベクトルを入力すると、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、オフセットベクトルをオフセットして計算した画素を中心とした、各単位処理モードの演算ブロック内において、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断された画素の水平方向の画素差分Δxおよび垂直方向の画素差分Δyを算出する。また、水平垂直画素差分算出部423は、時間方向の画素差分Δt、水平方向の画素差分Δx、垂直方向の画素差分Δyを勾配積算部424に出力する。勾配積算部424は、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断された画素の勾配を積算する。すなわち、勾配積算部424は、時間画素差分算出部421により算出された時間方向の画素差分Δt、水平垂直画素差分算出部423により算出された水平方向の画素差分Δx、および、垂直方向の画素差分Δyを積算し、積算された勾配の値を、ベクトル算出部425に出力する。   When the horizontal / vertical pixel difference calculation unit 423 receives the offset vector input from the pixel difference value determination unit 422, the frame t of the image at time t input through the prefilters 102-1 and 102-2, and the time The pixel difference Δt in the time direction is smaller than a predetermined pixel difference value in the calculation block of each unit processing mode centered on the pixel calculated by offsetting the offset vector using the frame t + 1 of the t + 1 image. The pixel difference Δx in the horizontal direction and the pixel difference Δy in the vertical direction of the pixel determined to be calculated are calculated. The horizontal / vertical pixel difference calculation unit 423 outputs the pixel difference Δt in the time direction, the pixel difference Δx in the horizontal direction, and the pixel difference Δy in the vertical direction to the gradient integration unit 424. The gradient integration unit 424 integrates the gradients of pixels that are determined to have a pixel difference Δt in the time direction smaller than a predetermined pixel difference value. That is, the gradient integrating unit 424 is configured to calculate the temporal pixel difference Δt calculated by the temporal pixel difference calculating unit 421, the horizontal pixel difference Δx calculated by the horizontal / vertical pixel difference calculating unit 423, and the vertical pixel difference. Δy is integrated, and the integrated gradient value is output to the vector calculation unit 425.

ベクトル算出部425は、時間画素差分算出部421からオフセットベクトルが入力されると、勾配積算部424により積算された勾配の値、および上述した式(9)の最小自乗和を用いて、動きベクトルvnを算出する。また、ベクトル算出部425は、時間画素差分算出部421からのオフセットベクトルを、算出した動きベクトルvnに加算して、動きベクトルVnを求め、ベクトル評価部104および遅延部405に出力する。   When the offset vector is input from the time pixel difference calculation unit 421, the vector calculation unit 425 uses the value of the gradient accumulated by the gradient accumulation unit 424 and the least square sum of Equation (9) described above to use the motion vector. vn is calculated. Further, the vector calculation unit 425 adds the offset vector from the temporal pixel difference calculation unit 421 to the calculated motion vector vn to obtain a motion vector Vn, and outputs it to the vector evaluation unit 104 and the delay unit 405.

次に、動きベクトルの検出対象ブロックと演算ブロックについて説明する。画像内のオブジェクトの動きを考えた場合、同じオブジェクトであれば、大方同じ動きをしていることが多い。したがって、動きベクトルを検出する検出処理の単位は、通常、図28に示されるように、ブロック単位で行うことが多い。   Next, the motion vector detection target block and the calculation block will be described. When considering the movement of an object in an image, the same object often moves the same. Therefore, the unit of detection processing for detecting a motion vector is usually performed in units of blocks as shown in FIG.

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

図28の例の場合、各フレームの検出対象ブロックKとして、8画素×8画素のブロック(以下、8×8ブロックと称する)が示されている。この検出対象ブロックKとは、8×8ブロックに関して動きベクトルの検出を行ったときに、その8×8ブロックに対して同じ動きが求まるブロックのことをいう。   In the case of the example of FIG. 28, an 8 × 8 pixel block (hereinafter referred to as an 8 × 8 block) is shown as the detection target block K of each frame. The detection target block K is a block in which the same motion is obtained for the 8 × 8 block when the motion vector is detected for the 8 × 8 block.

一方、勾配法による動きベクトルの検出(すなわち、演算)は、画素毎に動きベクトルを検出できる特徴を有している。しかしながら、画素単位での動きベクトルの演算を行うと、統計的な解法である最小自乗法を用いる勾配法では、検出精度が著しく低下する欠点がある。したがって、通常、ブロック毎だけでなく、画素毎の処理単位であっても、動きベクトルを演算する場合には、勾配法の演算に用いられる画素は、ブロック(演算ブロック)単位で構成されることが多い。   On the other hand, motion vector detection (that is, calculation) by the gradient method has a feature that a motion vector can be detected for each pixel. However, when the motion vector is calculated in units of pixels, the gradient method using the least square method, which is a statistical solution, has a drawback that the detection accuracy is significantly reduced. Therefore, in general, when calculating a motion vector not only for each block but also for each pixel, the pixels used for the calculation of the gradient method are configured in units of blocks (calculation blocks). There are many.

以上のように、勾配法の演算に用いられる画素は、8×8ブロックの演算ブロックの画素とされる。すなわち、図28の例においては、演算ブロック(8×8)を用いて、勾配法演算を行った結果得られる動きベクトルは、検出対象ブロックK(8×8)のすべての画素に対応する動きベクトルということになる。   As described above, the pixels used for the calculation of the gradient method are the pixels of the calculation block of 8 × 8 blocks. That is, in the example of FIG. 28, the motion vector obtained as a result of the gradient method computation using the computation block (8 × 8) is the motion corresponding to all the pixels of the detection target block K (8 × 8). It will be a vector.

しかしながら、上述したように勾配法の演算に用いられる画素を、演算ブロック単位に扱う際に発生する問題として、図29に示されるように、検出対象ブロックを構成する画素の中に、異なる動きを持つオブジェクトの画素が混在する場合が挙げられる。   However, as described above, as a problem that occurs when the pixels used for the calculation of the gradient method are handled in units of calculation blocks as described above, different motions are generated in the pixels constituting the detection target block as shown in FIG. An example is a case where pixels of objects that are held are mixed.

図29の例においては、8×8画素(64画素)により構成される検出対象ブロック(=演算ブロック)Kにおいて、左上の画素から28画素(太線丸)が、矢印Aに示される斜め左上への動きを有しており、8×8の検出対象ブロックKにおいて、右下の画素から36画素(細線丸)が、矢印Bに示される右横への動きを有している。   In the example of FIG. 29, in the detection target block (= calculation block) K composed of 8 × 8 pixels (64 pixels), 28 pixels (thick line circles) from the upper left pixel to the diagonally upper left indicated by the arrow A. In the 8 × 8 detection target block K, 36 pixels (thin line circles) from the lower right pixel have a rightward movement indicated by an arrow B.

したがって、検出対象ブロックKにおいて、上述したような大方同じ動きであるという仮定が崩れてしまい、動きの異なる画素を含んだままの演算ブロックを用いて、勾配法の演算を行うと、著しく、動きベクトルの検出精度が低下してしまう。すなわち、これは、異なる動きを持つオブジェクト同士の境界に発生する、オブジェクトの消滅領域(カバードバックグラウンド領域)および発生領域(アンカバードバックグラウンド領域)に関する検出精度低下問題である。消滅領域は、前景領域に対して、前景のオブジェクトの進行方向の全端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が前景に覆い隠される領域をいう。これに対して、発生領域は、前景領域に対して、前景のオブジェクトの進行方向の後端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が現れる領域をいう。   Therefore, in the detection target block K, the assumption that the movements are almost the same as described above is lost, and if the calculation of the gradient method is performed using a calculation block that includes pixels with different movements, the movement is remarkably increased. The vector detection accuracy is 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 all end portions in the advancing direction of the foreground object with respect to the foreground region, and is a region where the background component is covered with the foreground as time passes. On the other hand, the generation region is a mixed region at a position corresponding to the rear end of the foreground object in the traveling direction with respect to the foreground region, and refers to a region where a background component appears as time passes.

図30は、同じオブジェクトである場合の検出対象ブロックの輝度の状態を説明する図である。図中左側においては、矢印Xは、水平方向を示しており、矢印Yは、垂直方向を示している。また、矢印Tは、図中、右奥の時刻tのフレームtから、左手前の時刻t+1のフレームt+1への時間の経過方向を示している。また、図中右側においては、矢印Xは、水平方向を示しており、矢印Lは、輝度値を示している。すなわち、図中右側の輝度値Lp1,Lp2,Lp3,…,Lpi(3<i<7),…,Lp7は、図中左側のフレームtの8×8の検出対象ブロックにおいて、例えば、左上の画素から下に5番目の行の画素p1,p2,p3,…,pi(3<i<7),…,p7,…の輝度値を表しており、同様に、輝度値Lq1,Lq2,Lq3,…,Lqi(3<i<7),…,Lq7は、図中左側のフレームt+1の8×8の検出対象ブロックにおいて、画素p1,p2,p3,…,pi(3<i<7),…,p7,…とそれぞれ同位相に位置する画素である、左上の画素から下に5番目の行の画素q1,q2,q3,…,qi(3<i<7),…,q7,…の輝度値を表している。また、輝度値Lp1乃至Lp7およびLq1乃至Lq7間の矢印は、フレームt上の画素とフレームt+1上の画素の時間方向差分Δtを示している。   FIG. 30 is a diagram for explaining the luminance state of the detection target block in the case of the same object. On the left side in the figure, the arrow X indicates the horizontal direction, and the arrow Y indicates the vertical direction. In addition, an arrow T indicates the direction of time passage from the frame t at the time t in the back right to the frame t + 1 at the time t + 1 in the left front. On the right side in the figure, the arrow X indicates the horizontal direction, and the arrow L indicates the luminance value. That is, the luminance values Lp1, Lp2, Lp3,..., Lpi (3 <i <7),..., Lp7 on the right side in the figure are, for example, the upper left in the 8 × 8 detection target block of the frame t on the left side in the figure. .., Pi (3 <i <7),..., P7,..., And similarly, the luminance values Lq1, Lq2, and Lq3. ,..., Lqi (3 <i <7),..., Lq7 are pixels p1, p2, p3,..., Pi (3 <i <7) in the 8 × 8 detection target block in the left frame t + 1 in the drawing. ,..., P7,... Are pixels located in the same phase as the pixels q1, q2, q3,..., Qi (3 <i <7),. Represents the luminance value. The arrows between the luminance values Lp1 to Lp7 and Lq1 to Lq7 indicate the time direction difference Δt between the pixel on the frame t and the pixel on the frame t + 1.

したがって、図30の例においては、画素p1と画素q1の時間方向差分Δtは、輝度値Lp1と輝度値Lq1の差で表され、画素p2と画素q2の時間方向差分Δtは、輝度値Lp2と輝度値Lq2の差で表され、画素p3と画素q3の時間方向差分Δtは、輝度値Lp3と輝度値Lq3の差で表され、画素piと画素qiの時間方向差分Δtは、輝度値Lpiと輝度値Lqiの差で表され、画素p7と画素q7の時間方向差分Δtは、輝度値Lp7と輝度値Lq7の差で表され、各輝度値の差は、輝度値Lp1乃至Lp7を結んだ曲線と、輝度値Lq1乃至Lq7を結んだ曲線の形状がほぼ同形状で示されるように、輝度変化が小さい。   Therefore, in the example of FIG. 30, the time direction difference Δt between the pixel p1 and the pixel q1 is represented by the difference between the luminance value Lp1 and the luminance value Lq1, and the time direction difference Δt between the pixel p2 and the pixel q2 is the luminance value Lp2. The time direction difference Δt between the pixel p3 and the pixel q3 is represented by the difference between the luminance value Lp3 and the luminance value Lq3, and the time direction difference Δt between the pixel pi and the pixel qi is represented by the luminance value Lpi. The time direction difference Δt between the pixel p7 and the pixel q7 is represented by the difference between the luminance value Lp7 and the luminance value Lq7, and each luminance value difference is a curve connecting the luminance values Lp1 to Lp7. And, the change in luminance is small so that the shape of the curve connecting the luminance values Lq1 to Lq7 is shown as substantially the same shape.

以上のように、検出対象ブロックの中の画素が、同じオブジェクトである(すなわち、同一動きである)場合には、時間方向の対応画素について、輝度変化は、あまり大きくない。   As described above, when the pixels in the detection target block are the same object (that is, the same motion), the luminance change is not so large for the corresponding pixel in the time direction.

図31は、異なる動きを持つオブジェクトの画素が混在する場合の検出対象ブロックの輝度の状態を説明する図である。なお、図30において、図31における場合と対応する部分には対応する符号を付してあり、その説明は繰り返しになるので省略するが、図31の例においては、フレームt上の画素p7が、他の画素と異なる動きを有している。   FIG. 31 is a diagram illustrating the luminance state of a detection target block when pixels of objects having different movements are mixed. In FIG. 30, portions corresponding to those in FIG. 31 are denoted by the corresponding reference numerals, and the description thereof will be omitted to avoid repetition. However, in the example of FIG. 31, the pixel p7 on the frame t is , Has a different motion from other pixels.

例えば、フレームt上の画素p7が、他の画素と同じ動きを有している場合には、フレームt+1上において、画素p7と同位相に位置する画素q7の輝度値は、輝度値Lq7−1で表されるはずであるが、図31の例においては、画素p7は、他の画素と異なる動きを有しているため、画素q7の輝度値は、輝度値Lq7−2に示されるように、輝度値Lq7−1よりも図中下側に大きく変化している。したがって、画素p7と画素q7の時間方向差分Δt(輝度値Lp7と、輝度値Lq7−2の差)は、大きくなってしまう。   For example, when the pixel p7 on the frame t has the same movement as other pixels, the luminance value of the pixel q7 located in the same phase as the pixel p7 on the frame t + 1 is the luminance value Lq7-1. In the example of FIG. 31, the pixel p7 has a different motion from the other pixels. Therefore, the luminance value of the pixel q7 is represented by the luminance value Lq7-2. The luminance value Lq7-1 is greatly changed to the lower side in the figure. Therefore, the time direction difference Δt (the difference between the luminance value Lp7 and the luminance value Lq7-2) between the pixel p7 and the pixel q7 becomes large.

このように、例えば、検出対象ブロック内に、上述したオブジェクトの消滅、発生、または変形などにより、異なる動きを有するオブジェクトの画素が混在する場合には、対応する画素の輝度値が大きく変化することが多く、このことが、動きの乱れにつながってしまう恐れがある。そこで、有効画素判定部403において、輝度変化が小さい画素は、動きベクトル検出に用いても有効であり、逆に、輝度変化が大きい画素は、動きベクトル検出に用いると、有効ではないと判断するようにする。すなわち、輝度変化の大小という要素に着目し、輝度変化の大小でその画素が有効か無効かを判断することにより、輝度変化が小さい画素は、動きベクトル検出に用い、逆に、輝度変化が大きい画素は、動きベクトル検出に用いないようにすることができる。これにより、動きベクトル検出の精度を高くすることができる。   Thus, for example, when pixels of an object having different movements are mixed in the detection target block due to the disappearance, generation, or deformation of the above-described object, the luminance value of the corresponding pixel greatly changes. This often leads to disturbances in movement. Therefore, in the effective pixel determination unit 403, a pixel with a small luminance change is effective even when used for motion vector detection, and conversely, a pixel with a large luminance change is determined to be ineffective when used for motion vector detection. Like that. That is, paying attention to the factor of the brightness change, and determining whether the pixel is valid or invalid by the brightness change, the pixel having a small brightness change is used for motion vector detection. Conversely, the brightness change is large. Pixels can be prevented from being used for motion vector detection. Thereby, the accuracy of motion vector detection can be increased.

具体的に説明すると、有効画素判定部403は、演算ブロック内の各画素について、時間方向の画素差分Δtに所定の画素差分値(しきい値)を設定し、時間方向の画素差分Δtが、設定された所定の画素差分値よりも小さい場合には、その画素は、動きベクトル検出に寄与する(有効である)と判定し、動きベクトルを検出する際の勾配法の演算に用いるが、時間方向の画素差分Δtが、設定された所定の画素差分値以上である場合には、その画素は、動きの乱れを発生させる恐れがあるとして、動きベクトルを検出する際の勾配法の演算から除外する。これにより、異なる動きが混入することが抑制され、より安定した勾配法演算が実行され、その結果、確からしい動きベクトルが検出される。   Specifically, the effective pixel determination unit 403 sets a predetermined pixel difference value (threshold value) for the pixel difference Δt in the time direction for each pixel in the calculation block, and the pixel difference Δt in the time direction is When the pixel difference value is smaller than the set predetermined pixel difference value, it is determined that the pixel contributes (is effective) to motion vector detection, and is used for the calculation of the gradient method when detecting the motion vector. If the pixel difference Δt in the direction is greater than or equal to the set predetermined pixel difference value, the pixel is excluded from the gradient method calculation when detecting a motion vector because there is a risk of disturbing motion. To do. Thereby, mixing of different motions is suppressed, and more stable gradient method calculation is executed. As a result, a probable motion vector is detected.

ただし、上述したように、勾配法演算は、統計的な解法である最小自乗法に基づいた演算であるため、勾配法演算に用いる画素と用いない画素を切り分けることにより、勾配法演算に用いられる画素が極端に少なくなり、これらの極端に少ない画素数で勾配法演算が行われてしまうと、逆に、演算の信頼性が低下してしまい、動きベクトル検出の精度が低下してしまう恐れがある。   However, as described above, since the gradient method calculation is based on the least square method, which is a statistical solution, it is used for the gradient method calculation by separating the pixels used for the gradient method calculation from the pixels not used. If the number of pixels is extremely small and the gradient method calculation is performed with these extremely small number of pixels, the reliability of the calculation is lowered, and the accuracy of motion vector detection may be reduced. is there.

そこで、有効画素判定部403は、勾配法演算に用いられる画素数が少ない場合には、この検出対象ブロック(8×8)の処理単位での演算は不安定であるとし、図32に示されるように、8×8ブロック内の画素(64個)毎の演算単位に切り替えて処理を行う。   Therefore, when the number of pixels used for the gradient method calculation is small, the effective pixel determination unit 403 determines that the calculation in the processing unit of this detection target block (8 × 8) is unstable and is shown in FIG. As described above, the processing is performed by switching to the calculation unit for each pixel (64 pixels) in the 8 × 8 block.

図32は、画素単位処理における演算ブロックの例を示している。図32の例においては、フレーム上の検出対象ブロック(ブロック単位の演算ブロック)K(8×8)が画素単位処理に切り替えられた場合の、検出対象ブロックKの左上の画素pの演算ブロックE(図32の例の場合、9×9)を示している。   FIG. 32 shows an example of a calculation block in pixel unit processing. In the example of FIG. 32, the calculation block E of the pixel p at the upper left of the detection target block K when the detection target block (block-based calculation block) K (8 × 8) on the frame is switched to pixel-unit processing. (9 × 9 in the example of FIG. 32) is shown.

すなわち、画素pの動きベクトルを求める際には、画素pを中心とした演算ブロックE(図32の例の場合、9×9)が用いられる。また、例えば、画素pの右隣の画素の動きベクトルを求める場合には、画素pの右隣の画素を中心とした演算ブロック9×9(図示せず)が用いられる。   That is, when the motion vector of the pixel p is obtained, a calculation block E (9 × 9 in the example of FIG. 32) centered on the pixel p is used. For example, when obtaining a motion vector of a pixel right next to the pixel p, an arithmetic block 9 × 9 (not shown) centered on the pixel right next to the pixel p is used.

したがって、例えば、検出対象ブロックKにおいて、大半が画素pと異なる動きをしていたとしても、検出対象ブロックK(8×8)において、勾配法演算に用いられる画素数が計数され、その数が少ない場合には、画素単位処理に切り替えられるので、図32に示されるように、画素単位処理での演算ブロックEを用いて勾配法の演算を実行することができる。   Therefore, for example, even if most of the detection target block K moves differently from the pixel p, in the detection target block K (8 × 8), the number of pixels used in the gradient method calculation is counted, and the number is When the number is small, the process is switched to the pixel unit process, and as shown in FIG. 32, the calculation of the gradient method can be executed using the calculation block E in the pixel unit process.

このように、勾配法演算に用いる画素と用いない画素を切り分け、勾配法演算に用いられる画素が極端に少なくなった場合に、検出対象ブロックK(8×8)ブロック内すべての画素について動きベクトルの検出をやめるのではなく、画素単位処理に切り替えて、画素毎に、演算ブロックE(9×9)の画素を変えて勾配法演算するようにすることで、演算に用いられない画素の混在を少しでも防ぎ、画素によっては、より高精度の動きベクトルの検出を行うことができる。   As described above, when the pixels used for the gradient method calculation are separated from the pixels used for the gradient method calculation, and the number of pixels used for the gradient method calculation becomes extremely small, the motion vector for all the pixels in the detection target block K (8 × 8) block. Instead of stopping the detection of pixels, the gradient method calculation is performed by changing the pixel of the calculation block E (9 × 9) for each pixel, thereby mixing pixels that are not used in the calculation. As a result, motion vectors can be detected with higher accuracy depending on the pixel.

図33は、図29の検出対象ブロック(演算ブロック)Kの画素に、画素単位処理を適用する例を示す図である。図33の例においては、矢印Aに示される斜め左上への動きを有する画素(太線丸)と、矢印Bに示される右横への動きの2つの異なる動きを有する画素(細線丸)からなる図29の検出対象ブロックK(8×8)において、画素単位での処理が行われる。この場合において、検出対象ブロックKの左上の検出対象画素pの動きベクトルを検出するとき、検出対象画素pを中心とした演算ブロックE(図33の例の場合、9×9)が用いられる。   FIG. 33 is a diagram illustrating an example in which pixel unit processing is applied to the pixels of the detection target block (arithmetic block) K in FIG. In the example of FIG. 33, the pixel has a pixel having a diagonally upper left movement indicated by arrow A (thick line circle) and a pixel having two different movements indicated by an arrow B (thin line circle). In the detection target block K (8 × 8) in FIG. 29, processing in units of pixels is performed. In this case, when detecting the motion vector of the detection target pixel p at the upper left of the detection target block K, the calculation block E (9 × 9 in the example of FIG. 33) centering on the detection target pixel p is used.

演算ブロックE内の画素は、矢印Bに示される右横への動きを有する右下の3画素(細線丸)以外を除いて、矢印Aに示される斜め左上への動きを有している。ここで、上述したブロック単位処理の場合と同様に、演算ブロックE内の各画素について、時間方向画素差分Δtに所定のしきい値(画素差分値)を設定し、時間方向画素差分Δtが、設定された所定の画素差分値よりも小さい場合には、その画素は、動きベクトル検出に寄与する(有効である)と判定し、動きベクトルを検出する際の勾配法演算に用いるが、時間方向画素差分Δtが、設定された所定の画素差分値よりも大きい場合には、その画素は、動きの乱れを発生させる恐れがあるとして、動きベクトルを検出する際の勾配法演算に用いない。   The pixels in the computation block E have a diagonally upper left movement indicated by an arrow A except for the lower right three pixels (thin line circles) having a horizontal movement indicated by an arrow B. Here, as in the case of the block unit processing described above, for each pixel in the computation block E, a predetermined threshold value (pixel difference value) is set for the time direction pixel difference Δt, and the time direction pixel difference Δt is When the pixel difference value is smaller than the set predetermined pixel difference value, it is determined that the pixel contributes (is effective) to motion vector detection, and is used for gradient method calculation when detecting a motion vector. When the pixel difference Δt is larger than the set predetermined pixel difference value, the pixel is not used for the gradient method calculation when detecting a motion vector because it may cause a disturbance of motion.

すなわち、図33の例においては、演算ブロックEにおいて、右下の3画素(細線丸)を除いた画素(太線丸)が、検出対象画素pの勾配法演算に有効な画素であるとされ、その有効な画素が用いられて勾配法演算が実行されるため、図29の検出対象ブロックK(8×8)を、演算ブロックとして用いて実行されるブロック単位処理の勾配法演算よりも、より安定した勾配法演算が実行され、その結果、確からしい動きベクトルが検出される。   That is, in the example of FIG. 33, in the calculation block E, the pixels (thick line circles) excluding the lower right three pixels (thin line circles) are considered to be effective pixels for the gradient method calculation of the detection target pixel p. Since the effective pixel is used and the gradient method calculation is executed, the detection target block K (8 × 8) in FIG. 29 is more than the gradient method calculation of the block unit processing executed using the calculation block. A stable gradient method operation is performed and, as a result, a probable motion vector is detected.

なお、この画素毎の演算ブロックにおいても、勾配法演算に用いる画素と用いない画素を切り分けることにより、勾配法演算に用いられる画素が極端に少なくなってしまう場合には、動きベクトルを検出することが危険であるとし、演算は、打ち切られる。すなわち、動きベクトル検出が不安定であるにもかかわらす、何かしらの大きさを有する動きが検出されたことにしてしまうと、実際の画像内のオブジェクトの動きにそぐわない(確からしくない)動きベクトルになってしまう恐れがあるからである。このような確からしくない動きベクトルを用いた上で、以降の処理(例えば、ベクトル割付処理またはベクトル補償処理)が実行され、生成された画像は、動きが不連続になってしまったり、ブロックノイズが発生してしまうなどの大きな視覚劣化を及ぼしてしまう場合が多い。   Even in the calculation block for each pixel, if the pixels used for the gradient method calculation are extremely reduced by separating the pixels used for the gradient method calculation from those not used, a motion vector is detected. The operation is aborted. That is, even if the motion vector detection is unstable, if a motion having some size is detected, the motion vector does not match the motion of the object in the actual image (not sure). Because there is a risk of becoming. Subsequent processing (for example, vector allocation processing or vector compensation processing) is executed after using such uncertain motion vectors, and the generated image may have motion discontinuities or block noise. In many cases, it causes a large visual deterioration such as the occurrence of the above.

したがって、画素単位の勾配法演算に用いられる画素が極端に少なくなってしまう場合、検出される動きベクトルは、例えば、0ベクトル(すなわち、静止状態)が用いられる。これにより、以降の処理において、この動きベクトルが、悪影響を及ぼすことが抑制され、生成される画像の大きな視覚劣化を抑制することができる。   Accordingly, when the number of pixels used for pixel-based gradient method calculation becomes extremely small, for example, a zero vector (that is, a stationary state) is used as the detected motion vector. Thereby, in the subsequent processing, this motion vector is suppressed from having an adverse effect, and large visual deterioration of the generated image can be suppressed.

次に、図34のフローチャートを参照して、反復勾配法演算処理の詳細を説明する。前段よりモード選択部401に初期ベクトルV0が入力される。   Next, details of the iterative gradient method calculation processing will be described with reference to the flowchart of FIG. The initial vector V0 is input to the mode selection unit 401 from the previous stage.

モード選択部401は、ステップS401において、ブロック単位処理モードを選択し、フレームt上のブロックを、検出対象ブロック(演算ブロック)とし、検出対象ブロックの初期ベクトルV0をセレクタ402およびベクトル評価部104に出力し、ステップS402に進む。これにより、反復勾配法演算部103の各部においては、ブロック単位での処理が実行される。ステップS402において、セレクタ402は、ベクトル評価部104からの制御に応じて、モード選択部401から入力された初期ベクトルV0をオフセットベクトルとして選択し、選択したオフセットベクトルを、時間画素差分算出部411および時間画素差分算出部421に出力し、ステップS403に進む。   In step S401, the mode selection unit 401 selects a block unit processing mode, sets the block on the frame t as a detection target block (calculation block), and sets the initial vector V0 of the detection target block to the selector 402 and the vector evaluation unit 104. Output, and proceed to step S402. As a result, each unit of the iterative gradient method computing unit 103 executes processing in units of blocks. In step S402, the selector 402 selects the initial vector V0 input from the mode selection unit 401 as an offset vector in accordance with control from the vector evaluation unit 104, and selects the selected offset vector as a time pixel difference calculation unit 411 and The result is output to the time pixel difference calculation unit 421, and the process proceeds to step S403.

ステップS403において、時間画素差分算出部411および画素差分値判定部412は、選択されたオフセットベクトルを用いて(いまの場合、初期ベクトルV0をオフセットして)、ブロック単位の有効画素判定処理を実行し、ステップS404に進む。この有効画素判定処理の詳細は、図35を参照して後述するが、この有効画素判定処理により、有効画素数カウンタ413には、ブロック単位の演算ブロック内において、画素差分値が所定の画素差分値よりも小さいと判定された(すなわち、後段の勾配法演算で有効な画素であると判定された)画素の数がカウントされている。   In step S403, the temporal pixel difference calculation unit 411 and the pixel difference value determination unit 412 execute the effective pixel determination process in units of blocks using the selected offset vector (in this case, the initial vector V0 is offset). Then, the process proceeds to step S404. The details of this effective pixel determination process will be described later with reference to FIG. 35. With this effective pixel determination process, the effective pixel number counter 413 has a pixel difference value of a predetermined pixel difference within a block-by-block calculation block. The number of pixels determined to be smaller than the value (that is, determined to be an effective pixel in the subsequent gradient method calculation) is counted.

勾配法継続判定部414は、ステップS404において、有効画素数カウンタ413にカウントされている画素数(有効画素数)が所定のしきい値αより多いか否かを判断し、有効画素数が所定のしきい値αより多いと判断した場合、勾配法演算部404に、ブロック単位で、勾配法演算を実行させるフラグ(flg=1)を出力し、ステップS405に進む。   In step S404, the gradient method continuation determination unit 414 determines whether or not the number of pixels counted by the effective pixel number counter 413 (effective pixel number) is greater than a predetermined threshold value α, and the effective pixel number is predetermined. If it is determined that the value is larger than the threshold value α, a flag (flg = 1) for executing the gradient method calculation is output to the gradient method calculation unit 404 for each block, and the process proceeds to step S405.

ステップS405において、勾配法演算部404は、勾配法継続判定部414からのフラグに基づいて、セレクタ402からのオフセットベクトル(いまの場合、初期ベクトルV0)を用いて、ブロック単位の勾配法演算処理を実行し、ステップS406に進む。この勾配法演算処理の詳細は、図36を参照して後述するが、この勾配法演算処理により、動きベクトルVnが求められ、ベクトル評価部104および遅延部405に出力される。なお、動きベクトルVnは、1回目の勾配法演算により算出された動きベクトルvnに、オフセットベクトルVn−1が加算されたもの(Vn=Vn−1+vn)である。例えば、動きベクトルV1は、1回目の勾配法演算により算出された動きベクトルv1に、オフセットベクトル(初期ベクトルV0)が加算されたもの(V1=V0+v1)である。   In step S405, the gradient method calculation unit 404 uses the offset vector from the selector 402 (in this case, the initial vector V0) based on the flag from the gradient method continuation determination unit 414, and performs gradient method calculation processing in units of blocks. Is executed, and the process proceeds to step S406. The details of the gradient method calculation processing will be described later with reference to FIG. 36, but the motion vector Vn is obtained by this gradient method calculation processing and is output to the vector evaluation unit 104 and the delay unit 405. The motion vector Vn is obtained by adding the offset vector Vn−1 to the motion vector vn calculated by the first gradient method calculation (Vn = Vn−1 + vn). For example, the motion vector V1 is obtained by adding an offset vector (initial vector V0) to the motion vector v1 calculated by the first gradient method calculation (V1 = V0 + v1).

ステップS406において、ベクトル評価部104は、勾配法演算処理により求められた動きベクトルVnの評価値DFD(n)と、オフセットベクトルとして用いられた動きベクトルVn−1の評価値DFD(n−1)を求め、評価値DFD(n−1)よりも評価値DFD(n)が小さいか否か、すなわち、オフセットベクトルとして用いられた動きベクトルVn−1よりも勾配法演算処理により求められた動きベクトルVnの信頼度が高いか否かを判断する。具体的には、例えば、1回目の処理においては、求められた動きベクトルV1の評価値DFD(1)と、オフセットベクトルとして用いられた初期ベクトルV0の評価値DFD(0)が比較され、2回目の処理においては、求められた動きベクトルV2の評価値DFD(2)と、オフセットベクトルとして用いられた動きベクトルV1の評価値DFD(1)が比較される。   In step S406, the vector evaluation unit 104 evaluates the motion vector Vn obtained by the gradient method calculation process DFD (n) and the evaluation value DFD (n-1) of the motion vector Vn-1 used as the offset vector. , And whether or not the evaluation value DFD (n) is smaller than the evaluation value DFD (n−1), that is, the motion vector obtained by the gradient method calculation processing than the motion vector Vn−1 used as the offset vector It is determined whether or not the reliability of Vn is high. Specifically, 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 an offset vector. In the second processing, 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.

ベクトル評価部104は、ステップS406において、評価値DFD(n−1)よりも評価値DFD(n)が小さいと判断した場合、すなわち、動きベクトルVn−1よりも動きベクトルVnの信頼度が高いと判断された場合、ステップS407において、算出された動きベクトルVn(1回目の場合、動きベクトルV1、2回目の場合、動きベクトルV2)を、検出対象ブロックの動きベクトルVに設定して、ステップS408に進む。ベクトル評価部104は、ステップS408において、反復回数nを1つカウントし、ステップS409に進み、反復回数nが設定された最大反復回数(例えば、2回)になったか否かを判断し、まだ、反復回数nが設定された最大反復回数ではないと判断した場合、セレクタ402を制御し、ステップS402に戻り、それ以降の処理を繰り返させる。   When the vector evaluation unit 104 determines in step S406 that the evaluation value DFD (n) is smaller than the evaluation value DFD (n-1), that is, the reliability of the motion vector Vn is higher than the motion vector Vn-1. In step S407, the calculated motion vector Vn (in the first case, the motion vector V1, in the second case, the motion vector V2) is set as the motion vector V of the detection target block. The process proceeds to S408. In step S408, the vector evaluation unit 104 counts the number of iterations n by one, proceeds to step S409, determines whether or not the number of iterations n has reached the set maximum number of iterations (for example, two times), and If it is determined that the number of iterations n is not the set maximum number of iterations, the selector 402 is controlled to return to step S402 to repeat the subsequent processing.

すなわち、ステップS402において、セレクタ402は、ベクトル算出部425から出力され、遅延部405に保持された動きベクトルV1を、オフセットベクトルとして選択し、ステップS403において、時間画素差分算出部411および画素差分値判定部412は、動きベクトルV1をオフセットベクトルとして用いて、ブロック単位の有効画素判定処理を実行し、それ以降の処理を繰り返す。したがって、ステップS405において算出される動きベクトルV2は、2回目の勾配法演算により算出された動きベクトルv2に、オフセットベクトルとして用いられた動きベクトルV1が加算されたもの(すなわち、V2=V1+v2=V0+v1+v2)となる。   That is, in step S402, the selector 402 selects the motion vector V1 output from the vector calculation unit 425 and held in the delay unit 405 as an offset vector, and in step S403, the time pixel difference calculation unit 411 and the pixel difference value are selected. The determination unit 412 executes the effective pixel determination process in units of blocks using the motion vector V1 as an offset vector, and repeats the subsequent processes. Therefore, the motion vector V2 calculated in step S405 is obtained by adding the motion vector V1 used as the offset vector to the motion vector v2 calculated by the second gradient method calculation (that is, V2 = V1 + v2 = V0 + v1 + v2). )

ベクトル評価部104は、ステップS406において、評価値DFD(n−1)よりも評価値DFD(n)が小さくないと判断した場合、すなわち、動きベクトルVn−1の方が、動きベクトルVnよりも信頼度が高いと判断した場合、ステップS410に進み、勾配法演算のオフセットとしたベクトルVn−1(1回目の場合、初期ベクトルV0、2回目の場合、動きベクトルV1)を、検出対象ブロックの動きベクトルVに設定して、ステップS411に進む。また、ベクトル評価部104は、ステップS409において、反復回数nが設定された最大反復回数になったと判断した場合、ステップS411に進む。   When the vector evaluation unit 104 determines in step S406 that the evaluation value DFD (n) is not smaller than the evaluation value DFD (n−1), that is, the motion vector Vn−1 is more than the motion vector Vn. If it is determined that the reliability is high, the process proceeds to step S410, and the vector Vn−1 (the initial vector V0 in the first time, the motion vector V1 in the second time) is used as the offset of the gradient method calculation. The motion vector V is set and the process proceeds to step S411. If the vector evaluation unit 104 determines in step S409 that the number of iterations n has reached the set maximum number of iterations, the vector evaluation unit 104 proceeds to step S411.

ベクトル評価部104は、ステップS411において、動きベクトルVが、動きベクトルを検出する範囲として予め設定されたサーチエリア内であるか否かを判断し、動きベクトルVが、サーチエリア内であると判断した場合、ステップS415に進み、動きベクトルVを、検出対象ブロックに対応させて、検出ベクトルメモリ53に記憶し、反復勾配法処理を終了する。   In step S411, the vector evaluation unit 104 determines whether or not the motion vector V is within a search area preset as a range for detecting a motion vector, and determines that the motion vector V is within the search area. If so, the process proceeds to step S415, the motion vector V is stored in the detection vector memory 53 in association with the detection target block, and the iterative gradient method process is terminated.

また、ベクトル評価部104は、ステップS411において、動きベクトルVが、サーチエリア内ではないと判断した場合、ステップS412に進み、動きベクトルVを0ベクトルに設定し、ステップS415に進み、動きベクトルV(0ベクトル)を、検出対象ブロックに対応させて、検出ベクトルメモリ53に記憶し、反復勾配法処理を終了する。   If the vector evaluation unit 104 determines in step S411 that the motion vector V is not within the search area, the vector evaluation unit 104 proceeds to step S412, sets the motion vector V to 0 vector, proceeds to step S415, and proceeds to step S415. (0 vector) is stored in the detection vector memory 53 in association with the detection target block, and the iterative gradient method processing is terminated.

一方、勾配法継続判定部414は、ステップS404において、有効画素数カウンタ413の有効画素数が所定のしきい値α以下であると判断した場合、ステップS413に進み、モード選択部401を制御し、画素単位処理モードを選択させ、ステップS414に進む。これにより、反復勾配法演算部103の各部においては、画素単位での処理が実行される。モード選択部401は、ステップS414において、画素単位の反復勾配法演算処理を実行し、ステップS415に進む。この画素単位処理モードの反復勾配法演算処理の詳細は、図37を参照して後述するが、画素単位処理モードの反復勾配法演算処理により、検出対象ブロック内の全画素の動きベクトルVが求められるので、ベクトル評価部104は、ステップS415において、動きベクトルVを、検出対象ブロックの各画素に対応させて、検出ベクトルメモリ53に記憶し、反復勾配法処理を終了する。   On the other hand, if the gradient method continuation determination unit 414 determines in step S404 that the effective pixel number of the effective pixel number counter 413 is equal to or less than the predetermined threshold value α, the process proceeds to step S413 and controls the mode selection unit 401. The pixel unit processing mode is selected, and the process proceeds to step S414. As a result, each unit of the iterative gradient method computing unit 103 executes processing in units of pixels. In step S414, the mode selection unit 401 executes the iterative gradient method calculation process for each pixel, and the process proceeds to step S415. The details of the iterative gradient method computing process in the pixel unit processing mode will be described later with reference to FIG. 37, but the motion vector V of all pixels in the detection target block is obtained by the iterative gradient method computing process in the pixel unit processing mode. Therefore, in step S415, the vector evaluation unit 104 stores the motion vector V in the detection vector memory 53 in association with each pixel of the detection target block, and ends the iterative gradient method processing.

なお、上述したステップS406においては、動きベクトルの信頼度の評価を、勾配法処理により求められた動きベクトルVnの評価値DFD(n)と、オフセットベクトルとして用いられた動きベクトルVn−1の評価値DFD(n−1)を比較することで判断したが、評価値DFDの比較判断と同時に、勾配法演算により求められた動きベクトル(オフセットベクトルが加算される前の動きベクトル)vnのノルムの値(|vn|)が所定の大きさ(演算ブロック8×8の場合、例えば、16)よりも小さいことも判断するようにしてもよい。   In step S406 described above, the reliability of the motion vector is evaluated by evaluating the evaluation value DFD (n) of the motion vector Vn obtained by the gradient method processing and the motion vector Vn-1 used as the offset vector. Although the determination is made by comparing the value DFD (n−1), simultaneously with the comparison determination of the evaluation value DFD, the motion vector (motion vector before adding the offset vector) vn obtained by the gradient method calculation It may be determined that the value (| vn |) is smaller than a predetermined size (for example, 16 in the case of the calculation block 8 × 8).

ここで、ノルムとは、あるベクトル空間におけるベクトルの大きさを表し、例えば、原点(0,0)を起点とした(x,y)へのベクトルvのノルムは、次の式(11)で表される。   Here, the norm represents the magnitude of a vector in a certain vector space. For example, the norm of the vector v from the origin (0, 0) to (x, y) is expressed by the following equation (11). expressed.

Figure 0004432714
・・・(11)
Figure 0004432714
(11)

すなわち、勾配法演算においては、一般的に、微小動きに対して、精度の高い結果が得られるが、勾配法演算により求められた動きベクトルのノルム値|vn|が所定の大きさを超えてしまうと、その大きい動きベクトルvnに対して精度の高い結果が得られているとは限らない。したがって、評価値DFDと並行して、勾配法演算により求められた動きベクトルのノルム値|vn|が所定の大きさが所定の大きさを超えたか否かを判断し、ノルム値|vn|が所定の大きさを超えた動きベクトルを除外することにより、この勾配法演算においては、微小動きに対しても、大きい動きに対しても、精度の高い結果を得ることができ、さらに、動きベクトル検出の精度を向上させることができる。   That is, in the gradient method calculation, a high-precision result is generally obtained for a minute motion, but the norm value | vn | of the motion vector obtained by the gradient method calculation exceeds a predetermined magnitude. In other words, a highly accurate result is not always obtained for the large motion vector vn. Therefore, in parallel with the evaluation value DFD, it is determined whether or not the norm value | vn | of the motion vector obtained by the gradient method calculation exceeds a predetermined magnitude, and the norm value | vn | By excluding motion vectors that exceed a predetermined size, in this gradient method computation, it is possible to obtain highly accurate results for both small and large motions. The accuracy of detection can be improved.

なお、この評価値DFDの判断とノルム値による判断の場合には、ステップS406において、|vn|≦16である場合で、かつ、評価値DFD(n−1)>評価値DFD(n)である場合には、ステップS407に進み、V=Vnに設定され、ステップS406において、|vn|>16である場合で、または、評価値DFD(n−1)≦評価値DFD(n)である場合には、ステップS410に進み、V=Vn−1に設定される。   In the case of the determination of the evaluation value DFD and the determination based on the norm value, in step S406, when | vn | ≦ 16, and evaluation value DFD (n−1)> evaluation value DFD (n). If there is, the process proceeds to step S407, where V = Vn is set, and if | vn |> 16 in step S406, or evaluation value DFD (n−1) ≦ evaluation value DFD (n). In this case, the process proceeds to step S410, and V = Vn−1 is set.

次に、図35のフローチャートを参照して、有効画素判定処理の詳細を説明する。なお、図35は、図34のステップS403の有効画素判定処理の例を示している。   Next, the details of the effective pixel determination process will be described with reference to the flowchart of FIG. FIG. 35 shows an example of the effective pixel determination process in step S403 of FIG.

セレクタ402から、オフセットベクトルが入力されると、時間画素差分算出部411は、ステップS431において、画素差分値判定部412を制御し、有効画素数カウンタ413をリセットさせ、ステップS432に進み、ブロック単位の演算ブロックにおいて、画素を選択し、ステップS433に進む。なお、画素は、演算ブロックの左上の画素からラスタスキャン順に選択される。   When the offset vector is input from the selector 402, the temporal pixel difference calculation unit 411 controls the pixel difference value determination unit 412 in step S431, resets the effective pixel number counter 413, proceeds to step S432, and proceeds to block unit. In the calculation block, a pixel is selected, and the process proceeds to step S433. The pixels are selected in the raster scan order from the upper left pixel of the calculation block.

時間画素差分算出部411は、ステップS433において、オフセットベクトル、並びに、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームt、および時刻t+1の画像のフレームt+1を用いて、選択された画素の時間方向の画素差分Δtを算出し、算出された時間方向の画素差分Δtを画素差分値判定部412に出力し、ステップS434に進む。   In step S433, the time pixel difference calculation unit 411 uses the offset vector and the frame t of the image at time t and the frame t + 1 of the image at time t + 1 input via the pre-filters 102-1 and 102-2. Then, the pixel difference Δt in the time direction of the selected pixel is calculated, and the calculated pixel difference Δt in the time direction is output to the pixel difference value determination unit 412 and the process proceeds to step S434.

画素差分値判定部412は、ステップS434において、時間画素差分算出部411により算出された時間方向の画素差分Δtが、所定の画素差分値よりも小さいか否かを判断し、すなわち、後段の勾配法演算に有効な画素であるか否かを判断し、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断した場合、ステップS435に進み、有効画素数カウンタ413の有効画素の数を1つカウントし、ステップS436に進む。また、画素差分値判定部412は、ステップS434において、時間方向の画素差分Δtが、所定の画素差分値以上であると判断した場合、すなわち、後段の勾配法演算に有効な画素ではないと判断し、ステップS435の処理をスキップし、ステップS436に進む。   In step S434, the pixel difference value determination unit 412 determines whether or not the time direction pixel difference Δt calculated by the time pixel difference calculation unit 411 is smaller than a predetermined pixel difference value. It is determined whether or not the pixel is effective for the legal calculation, and if it is determined that the pixel difference Δt in the time direction is smaller than the predetermined pixel difference value, the process proceeds to step S435, and the effective pixel counter 413 determines the effective pixel number. The number is counted by one, and the process proceeds to step S436. Further, the pixel difference value determination unit 412 determines in step S434 that the time-direction pixel difference Δt is greater than or equal to a predetermined pixel difference value, that is, it is not a pixel that is effective for the subsequent gradient method calculation. Then, the process of step S435 is skipped, and the process proceeds to step S436.

時間画素差分算出部411は、ステップS436において、演算ブロック内のすべての画素の処理が終了したか否かを判断し、演算ブロック内のすべての画素の処理が終了していないと判断した場合、ステップS432に戻り、次の画素を選択し、それ以降の処理を繰り返す。一方、時間画素差分算出部411は、ステップS436において、演算ブロック内のすべての画素の処理が終了したと判断した場合、有効画素判定処理を終了し、図34のステップS404に戻る。   In step S436, the time pixel difference calculation unit 411 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 S432, the next pixel is selected, and the subsequent processing is repeated. On the other hand, if the time pixel difference calculation unit 411 determines in step S436 that all the pixels in the calculation block have been processed, the time pixel difference calculation unit 411 ends the effective pixel determination process and returns to step S404 in FIG.

以上の処理により、有効画素カウンタ413には、演算ブロック内において、その画素差分Δtが所定の画素差分値より小さく、後段の勾配法演算において有効であると判断された画素の数がカウントされている。したがって、勾配法継続判断部414は、図34のステップS404において、この有効画素カウンタ413の画素の数を参照することにより、ブロック単位の勾配法演算を行うか、画素単位の勾配法演算を行うかを判断することができる。   Through the above processing, the effective pixel counter 413 counts the number of pixels in the calculation block whose pixel difference Δt is smaller than a predetermined pixel difference value and determined to be effective in the subsequent gradient method calculation. Yes. Therefore, the gradient method continuation determination unit 414 performs the gradient method calculation in units of blocks or performs the gradient method calculation in units of pixels by referring to the number of pixels of the effective pixel counter 413 in step S404 of FIG. Can be determined.

次に、図36のフローチャートを参照して、ブロック単位の勾配法演算処理の詳細を説明する。なお、図36は、図34のステップS405のブロック単位の勾配法演算処理の例を示している。したがって、図36の例においては、時間画素差分算出部421には、勾配法継続判定部414から、勾配法演算を実行させるフラグ(flg=1)が入力される。   Next, the details of the gradient method calculation processing in units of blocks will be described with reference to the flowchart of FIG. Note that FIG. 36 illustrates an example of the gradient method calculation processing in units of blocks in step S405 of FIG. Therefore, in the example of FIG. 36, the flag (flg = 1) for executing the gradient method calculation is input from the gradient method continuation determination unit 414 to the time pixel difference calculation unit 421.

勾配法継続判定部414からフラグ(flg=1)が入力されると、時間画素差分算出部421は、ステップS451において、ブロック単位の演算ブロックにおいて、画素を選択し、ステップS452に進む。なお、画素は、演算ブロックの左上の画素からラスタスキャン順に選択される。   When the flag (flg = 1) is input from the gradient method continuation determination unit 414, the time pixel difference calculation unit 421 selects a pixel in the calculation unit in block units in step S451, and proceeds to step S452. The pixels are selected in the raster scan order from the upper left pixel of the calculation block.

時間画素差分算出部421は、ステップS452において、セレクタ402からのオフセットベクトル、並びに、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームt、および時刻t+1の画像のフレームt+1を用いて、選択された画素の時間方向の画素差分Δtを算出し、算出された時間方向の画素差分Δtおよびオフセットベクトルを、画素差分値判定部422に出力し、ステップS453に進む。   In step S452, the time pixel difference calculation unit 421 calculates the offset vector from the selector 402, the frame t of the image at time t input via the prefilters 102-1 and 102-2, and the image at time t + 1. The pixel difference Δt in the time direction of the selected pixel is calculated using the frame t + 1, and the calculated pixel difference Δt in the time direction and the offset vector are output to the pixel difference value determination unit 422, and the process proceeds to step S453.

画素差分値判定部422は、ステップS453において、時間画素差分算出部421により算出された時間方向の画素差分Δtが、所定の画素差分値よりも小さいか否かを判断し、すなわち、後段の勾配法演算に有効な画素であるか否かを判断し、時間方向の画素差分Δtが、所定の画素差分値よりも小さいと判断した場合、ステップS454に進み、垂直水平画素差分算出部423を制御し、有効であると判断した画素の水平方向の画素差分Δxを算出させる。なお、画素差分値判定部422における所定の画素差分値は、画素差分値判定部412における所定の画素差分値と同じ値であってもよいし、異なる値であってもよい。また、このとき、画素差分値判定部422は、時間画素差分算出部421により算出された時間方向の画素差分Δtおよびオフセットベクトルを、垂直水平画素差分算出部423に出力する。   In step S453, the pixel difference value determination unit 422 determines whether or not the pixel difference Δt in the time direction calculated by the time pixel difference calculation unit 421 is smaller than a predetermined pixel difference value. It is determined whether or not the pixel is effective for legal calculation, and if it is determined that the pixel difference Δt in the time direction is smaller than the predetermined pixel difference value, the process proceeds to step S454 and the vertical horizontal pixel difference calculation unit 423 is controlled. Then, the pixel difference Δx in the horizontal direction of the pixel determined to be effective is calculated. Note that the predetermined pixel difference value in the pixel difference value determination unit 422 may be the same value as or different from the predetermined pixel difference value in the pixel difference value determination unit 412. At this time, the pixel difference value determination unit 422 outputs the pixel difference Δt in the time direction and the offset vector calculated by the time pixel difference calculation unit 421 to the vertical horizontal pixel difference calculation unit 423.

垂直水平画素差分算出部423は、ステップS454において、オフセットベクトル、並びに、プリフィルタ102−1および102−2を介して入力される時刻tの画像のフレームt、および時刻t+1の画像のフレームt+1を用いて、有効であると判断された画素の水平方向の画素差分Δxを算出し、ステップS455に進み、有効であると判断された画素の垂直方向の画素差分Δyを算出し、時間方向の画素差分Δt、水平方向の画素差分Δx、および垂直方向の画素差分Δyを、勾配積算部424に出力し、ステップS456に進む。勾配積算部424は、ステップS456において、垂直水平画素差分算出部423からの時間方向の画素差分Δt、水平方向の画素差分Δx、および垂直方向の画素差分Δyを積算し、積算した結果をベクトル算出部425に出力し、ステップS457に進む。   In step S454, the vertical horizontal pixel difference calculation unit 423 calculates the offset vector and the frame t of the image at time t and the frame t + 1 of the image at time t + 1 input via the prefilters 102-1 and 102-2. The pixel difference Δx in the horizontal direction of the pixel determined to be effective is calculated, and the process proceeds to step S455, where the pixel difference Δy in the vertical direction of the pixel determined to be effective is calculated, and the pixel in the time direction is calculated. The difference Δt, the pixel difference Δx in the horizontal direction, and the pixel difference Δy in the vertical direction are output to the gradient integration unit 424, and the process proceeds to step S456. In step S456, the gradient integration unit 424 integrates the time-direction pixel difference Δt, the horizontal pixel difference Δx, and the vertical pixel difference Δy from the vertical horizontal pixel difference calculation unit 423, and calculates a vector result of the integration. The data is output to the unit 425, and the process proceeds to step S457.

画素差分値判定部422は、ステップS453において、時間方向の画素差分Δtが、所定の画素差分値以上であると判断した場合、ステップS454乃至S456の処理をスキップし、ステップS457に進む。すなわち、この画素の各画素差分(勾配)は、後段の勾配法演算に有効な画素ではないので、演算に用いられない。   If the pixel difference value determination unit 422 determines in step S453 that the time-direction pixel difference Δt is greater than or equal to the predetermined pixel difference value, the pixel difference value determination unit 422 skips the processing of steps S454 to S456 and proceeds to step S457. That is, each pixel difference (gradient) of this pixel is not used for the calculation because it is not a pixel effective for the subsequent gradient method calculation.

ステップS457において、時間画素差分算出部421は、演算ブロック内のすべての画素の処理が終了したか否かを判断し、演算ブロック内のすべての画素の処理が終了していないと判断した場合、ステップS451に戻り、次の画素を選択し、それ以降の処理を繰り返す。一方、時間画素差分算出部421は、ステップS457において、演算ブロック内のすべての画素の処理が終了したと判断した場合、ベクトル算出部425にオフセットベクトルを出力し、ステップS458に進む。ベクトル算出部425は、時間画素差分算出部421からオフセットベクトルが入力されると、勾配積算部424からの勾配の積算結果と、上述した式(9)の最小自乗和を用いて、動きベクトルvnを算出し、ステップS459に進み、時間画素差分算出部421からのオフセットベクトルに、算出された動きベクトルvnを加算した、動きベクトルVnを求めて、求められた動きベクトルVnをベクトル評価部104に出力し、勾配法演算処理を終了し、図34のステップS406に戻る。   In step S457, the time pixel difference calculation unit 421 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 S451, the next pixel is selected, and the subsequent processing is repeated. On the other hand, if the time pixel difference calculation unit 421 determines in step S457 that the processing of all the pixels in the calculation block has been completed, the time pixel difference calculation unit 421 outputs an offset vector to the vector calculation unit 425, and proceeds to step S458. When the offset vector is input from the time pixel difference calculation unit 421, the vector calculation unit 425 uses the gradient summation result from the gradient summation unit 424 and the least square sum of the above-described equation (9) to obtain the motion vector vn. Then, the process proceeds to step S459, the motion vector Vn is obtained by adding the calculated motion vector vn to the offset vector from the time pixel difference calculation unit 421, and the obtained motion vector Vn is sent to the vector evaluation unit 104. The gradient method calculation process is terminated, and the process returns to step S406 in FIG.

以上のように、時間方向の画素差分Δtが、設定された所定の画素差分値以上の場合には、その画素は、動きの乱れを発生させる恐れがあるとして、動きベクトルを検出する際の勾配法の演算から除外するようにしたので、より安定した勾配法演算が実行され、その結果、確からしい動きベクトルが検出され、これにより、動きベクトル検出の精度が向上される。   As described above, when the pixel difference Δt in the time direction is equal to or larger than a predetermined pixel difference value, the gradient at the time of detecting a motion vector is assumed that the pixel may cause a disturbance in motion. Since it is excluded from the calculation of the method, a more stable gradient method calculation is executed, and as a result, a probable motion vector is detected, thereby improving the accuracy of the motion vector detection.

次に、図37のフローチャートを参照して、画素単位の反復勾配法演算処理の詳細を説明する。図37は、図34のステップS414の画素単位の反復勾配法演算処理の例を示している。なお、この処理は、検出対象ブロック内の各画素について実行される。   Next, details of the iterative gradient method calculation processing in units of pixels will be described with reference to the flowchart of FIG. FIG. 37 shows an example of the iterative gradient method computing process for each pixel in step S414 of FIG. This process is executed for each pixel in the detection target block.

モード選択部401は、画素単位処理モードを設定すると、ステップS471において、検出対象ブロックの画素を検出対象画素として選択し、その画素の演算ブロック(例えば、9×9)の初期ベクトルV0を、セレクタ402およびベクトル評価部104に出力し、ステップS472に進む。なお、画素は、検出対象ブロックの左上の画素からラスタスキャン順に選択される。ステップS472において、セレクタ402は、ベクトル評価部104からの制御に応じて、モード選択部401から入力された初期ベクトルV0をオフセットベクトルとして選択し、選択したオフセットベクトルを、時間画素差分算出部411および時間画素差分算出部421に出力し、ステップS473に進む。   When the pixel unit processing mode is set, the mode selection unit 401 selects the pixel of the detection target block as the detection target pixel in step S471, and selects the initial vector V0 of the calculation block (for example, 9 × 9) of the pixel as a selector. 402 and the vector evaluation unit 104, and the process proceeds to step S472. The pixels are selected in the raster scan order from the upper left pixel of the detection target block. In step S472, the selector 402 selects the initial vector V0 input from the mode selection unit 401 as an offset vector in accordance with the control from the vector evaluation unit 104, and selects the selected offset vector as a time pixel difference calculation unit 411 and The result is output to the time pixel difference calculation unit 421, and the process proceeds to step S473.

ステップS473において、時間画素差分算出部411および画素差分値判定部412は、選択されたオフセットベクトルを用いて(いまの場合、初期ベクトルV0をオフセットとして)、画素単位の有効画素判定処理を実行し、ステップS474に進む。この有効画素判定処理の詳細は、図35を参照して上述したブロック単位の有効画素判定処理と、対象となる演算ブロック(ブロック範囲や、ブロックを構成する画素)が異なる以外、基本的に同様の処理を行うため、その詳細な説明を省略するが、この有効画素判定処理により、有効画素数カウンタ413には、画素単位の演算ブロック内において、画素差分値が所定の画素差分値よりも小さいと判定された(すなわち、後段の勾配法演算で有効な画素であると判定された)画素の数がカウントされている。なお、画素単位の有効画素判定を行う所定の画素差分値は、ブロック単位の場合と同じ値としてもよいし、異なる値を設定するようにしてもよい。   In step S473, the temporal pixel difference calculation unit 411 and the pixel difference value determination unit 412 execute the effective pixel determination process in units of pixels using the selected offset vector (in this case, using the initial vector V0 as an offset). The process proceeds to step S474. The details of the effective pixel determination process are basically the same except that the effective pixel determination process in units of blocks described above with reference to FIG. 35 is different from the target calculation block (block range and pixels constituting the block). However, by this effective pixel determination process, the effective pixel number counter 413 has a pixel difference value smaller than a predetermined pixel difference value in the calculation unit in units of pixels. (That is, the number of pixels determined to be effective pixels in the subsequent gradient method calculation) is counted. It should be noted that the predetermined pixel difference value for determining the effective pixel in pixel units may be the same value as in the block unit or may be set to a different value.

勾配法継続判定部414は、ステップS474において、有効画素数カウンタ413にカウントされている画素数(有効画素数)が所定のしきい値βより多いか否かを判断し、有効画素数が所定のしきい値βより多いと判断した場合、勾配法演算部404に、勾配法演算を実行させるフラグ(flg=1)を出力し、ステップS475に進む。なお、しきい値βも、ブロック単位の場合のしきい値αと同じ値としてもよいし、異なる値を設定するようにしてもよい。   In step S474, the gradient method continuation determination unit 414 determines whether or not the number of pixels (effective pixel number) counted by the effective pixel number counter 413 is greater than a predetermined threshold value β, and the effective pixel number is predetermined. If it is determined that the value is larger than the threshold value β, a flag (flg = 1) for executing the gradient method calculation is output to the gradient method calculation unit 404, and the process proceeds to step S475. Note that the threshold value β may be the same value as the threshold value α in the case of a block unit, or a different value may be set.

ステップS475において、勾配法演算部404は、勾配法継続判定部414からのフラグに基づいて、セレクタ402からのオフセットベクトル(初期ベクトルV0)を用いて、画素単位の勾配法演算処理を実行し、ステップS476に進む。この勾配法演算処理の詳細は、図36を参照して上述したブロック単位の勾配法演算処理と、対象となる演算ブロック(範囲や、ブロックを構成する画素)が異なる以外、基本的に同様の処理を行うため、その詳細な説明を省略するが、この勾配法演算処理により、検出対象画素の動きベクトルVnが求められ、ベクトル評価部104および遅延部405に出力される。なお、動きベクトルVnは、1回目の勾配法演算により求められた動きベクトルvnに、オフセットベクトルが加算されたもの(Vn=Vn−1+vn)となる。   In step S475, based on the flag from the gradient method continuation determination unit 414, the gradient method calculation unit 404 uses the offset vector (initial vector V0) from the selector 402 to execute a gradient method calculation process for each pixel, The process proceeds to step S476. The details of the gradient method calculation process are basically the same as the gradient method calculation process in units of blocks described above with reference to FIG. 36 except that the target calculation block (range and pixels constituting the block) is different. Although detailed description thereof is omitted for the purpose of processing, a motion vector Vn of the detection target pixel is obtained by this gradient method calculation processing, and is output to the vector evaluation unit 104 and the delay unit 405. The motion vector Vn is obtained by adding the offset vector to the motion vector vn obtained by the first gradient method calculation (Vn = Vn−1 + vn).

ステップS476において、ベクトル評価部104は、勾配法処理により算出された動きベクトルVnの評価値DFD(n)と、オフセットとして用いられた動きベクトルVn−1の評価値DFD(n−1)を求め、評価値DFD(n−1)よりも評価値DFD(n)が小さいか否か、すなわち、オフセットとして用いられた動きベクトルVn−1よりも勾配法処理により算出された動きベクトルVnの信頼度が高いか否かを判断する。   In step S476, the vector evaluation unit 104 obtains the evaluation value DFD (n) of the motion vector Vn calculated by the gradient method processing and the evaluation value DFD (n−1) of the motion vector Vn−1 used as the offset. , Whether the evaluation value DFD (n) is smaller than the evaluation value DFD (n−1), that is, the reliability of the motion vector Vn calculated by the gradient method processing than the motion vector Vn−1 used as the offset Judge whether or not is high.

ベクトル評価部104は、ステップS476において、評価値DFD(n−1)よりも評価値DFD(n)が小さいと判断された場合、すなわち、動きベクトルVn−1よりも動きベクトルVnの信頼度が高いと判断された場合、ステップS477において、算出された動きベクトルVn(1回目の場合、動きベクトルV1、2回目の場合、動きベクトルV2)を、検出対象画素の動きベクトルVに設定して、ステップS478に進む。ベクトル評価部104は、ステップS478において、反復回数nを1つカウントし、ステップS479に進み、反復回数nが設定された最大反復回数(例えば、2回)になったか否かを判断し、まだ、反復回数nが設定された最大反復回数ではないと判断した場合、セレクタ402を制御し、ステップS472に戻り、それ以降の処理を繰り返させる。   In step S476, the vector evaluation unit 104 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 is higher than the motion vector Vn−1. If it is determined that the value is high, in step S477, the calculated motion vector Vn (the first time, the motion vector V1, and the second time, the motion vector V2) is set as the motion vector V of the detection target pixel, The process proceeds to step S478. In step S478, the vector evaluation unit 104 counts the number of iterations n by one, proceeds to step S479, determines whether or not the number of iterations n has reached the set maximum number of iterations (for example, two times), and If it is determined that the number of iterations n is not the set maximum number of iterations, the selector 402 is controlled to return to step S472 to repeat the subsequent processing.

すなわち、ステップS472において、セレクタ402は、ベクトル算出部425から出力され遅延部405に保持された動きベクトルV1を、オフセットベクトルとして選択し、ステップS473において、時間画素差分算出部411および画素差分値判定部412は、オフセットベクトルである動きベクトルV1をオフセットして、画素単位の有効画素判定処理を実行し、それ以降の処理を繰り返す。したがって、ステップS475において求められる動きベクトルV2は、2回目の勾配法演算により算出された動きベクトルv2に、オフセットとなる動きベクトルV1が加算されたもの(すなわち、V2=V0+v1+v2)である。   That is, in step S472, the selector 402 selects the motion vector V1 output from the vector calculation unit 425 and held in the delay unit 405 as an offset vector, and in step S473, the temporal pixel difference calculation unit 411 and the pixel difference value determination The unit 412 offsets the motion vector V1, which is an offset vector, executes a valid pixel determination process in units of pixels, and repeats the subsequent processes. Therefore, the motion vector V2 obtained in step S475 is obtained by adding the offset motion vector V1 to the motion vector v2 calculated by the second gradient method calculation (that is, V2 = V0 + v1 + v2).

ベクトル評価部104は、ステップS476において、評価値DFD(n−1)よりも評価値DFD(n)が大きいと判断した場合、すなわち、動きベクトルVn−1の方が、動きベクトルVnよりも信頼度が高いと判断された場合、ステップS480に進み、勾配法演算のオフセットとしたベクトルVn−1(1回目の場合、初期ベクトルV0、2回目の場合、動きベクトルV1)を、検出対象ブロックの動きベクトルVに設定して、ステップS481に進む。また、ベクトル評価部104は、ステップS479において、反復回数nが設定された最大反復回数になったと判断した場合、ステップS481に進む。   In step S476, the vector evaluation unit 104 determines that the evaluation value DFD (n) is larger than the evaluation value DFD (n−1), that is, the motion vector Vn−1 is more reliable than the motion vector Vn. When it is determined that the degree is high, the process proceeds to step S480, and the vector Vn−1 (the initial vector V0 in the first case, the motion vector V1 in the second time) is used as the offset of the gradient method calculation. The motion vector V is set, and the process proceeds to step S481. If the vector evaluation unit 104 determines in step S479 that the number of iterations n has reached the set maximum number of iterations, the vector evaluation unit 104 proceeds to step S481.

ベクトル評価部104は、ステップS481において、動きベクトルVが、動きベクトルを検出する範囲として予め設定されたサーチエリア内であるか否かを判断し、動きベクトルVが、サーチエリア内であると判断した場合、ステップS483に進む。また、ベクトル評価部104は、ステップS481において、動きベクトルVが、サーチエリア内であると判断しなかった場合、ステップS482に進み、動きベクトルVを0ベクトルに設定し、ステップS483に進む。   In step S481, the vector evaluation unit 104 determines whether or not the motion vector V is within a search area preset as a range for detecting a motion vector, and determines that the motion vector V is within the search area. If so, the process proceeds to step S483. If the vector evaluation unit 104 determines in step S481 that the motion vector V is not within the search area, the vector evaluation unit 104 proceeds to step S482, sets the motion vector V to 0 vector, and proceeds to step S483.

一方、ステップS474において、勾配法継続判定部414は、有効画素数カウンタ413の有効画素数が所定のしきい値βより少ないと判断した場合、勾配法演算部404に勾配法演算を打ち切るフラグ(flg=0)を出力し、ステップS482に進む。時間画素差分算出部421は、フラグに基づいて、ベクトル算出部425を制御し、動きベクトルVを0ベクトルに設定させ、ステップS483に進む。   On the other hand, in step S474, when the gradient method continuation determination unit 414 determines that the effective pixel number of the effective pixel number counter 413 is less than the predetermined threshold value β, the gradient method calculation unit 404 has a flag ( flg = 0) is output, and the flow advances to step S482. Based on the flag, the temporal pixel difference calculation unit 421 controls the vector calculation unit 425 to set the motion vector V to 0 vector, and the process proceeds to step S483.

モード選択部401は、ステップS483において、検出対象ブロック内のすべての画素の処理が終了したか否かを判断し、検出対象ブロック内のすべての画素の処理が終了していないと判断した場合、ステップS471に戻り、検出対象ブロックの次の画素を、検出対象画素として、それ以降の処理を繰り返す。モード選択部401は、ステップS483において、検出対象ブロック内のすべての画素の処理が終了したと判断した場合、画素単位の反復勾配法演算処理を終了し、図34のステップS415に戻る。すなわち、画素単位の反復勾配法演算処理により、検出対象ブロック内すべての画素について動きベクトルVが求められるので、図34のステップS415に戻り、ベクトル評価部104は、動きベクトルVを、検出対象ブロックの各画素に対応させて、検出ベクトルメモリ53に記憶し、反復勾配法処理を終了する。   When the mode selection unit 401 determines in step S483 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 S471, the subsequent pixels of the detection target block are set as detection target pixels, and the subsequent processing is repeated. If the mode selection unit 401 determines in step S483 that the processing of all the pixels in the detection target block has been completed, the mode selection unit 401 ends the iterative gradient method calculation processing for each pixel, and returns to step S415 in FIG. That is, since 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, the process returns to step S415 in FIG. 34, and the vector evaluation unit 104 converts the motion vector V to the detection target block. Are stored in the detection vector memory 53 in correspondence with each of the pixels, and the iterative gradient method processing is terminated.

なお、ステップS476の動きベクトルの信頼度の評価も、ステップS406の場合と同様に、評価値DFDの判断とノルム値による判断を併用するようにしてもよい。   Note that, in the evaluation of the reliability of the motion vector in step S476, the evaluation value DFD determination and the norm value determination may be used in combination, as in the case of step S406.

以上のように、演算ブロック内の画素差分が所定の画素差分値よりも小さい画素のみ勾配法演算に用いるようにすることで、異なる動きを有する画素を演算対象から除くことができ、勾配法演算により求められる動きベクトルの確からしさが向上し、動きベクトル検出の精度が向上する。   As described above, by using only pixels whose pixel difference in the calculation block is smaller than the predetermined pixel difference value for the gradient method calculation, pixels having different motions can be excluded from the calculation target, and the gradient method calculation is performed. As a result, the certainty of the motion vector required by the method improves, and the accuracy of motion vector detection improves.

また、演算ブロック内の画素差分が所定の画素差分値よりも大きく、勾配法演算に用いられない画素数が、所定のしきい値よりも多かった場合に、適応的に、勾配法演算の処理を制御するようにしたので、特に、オブジェクトの動きの境界などにおいて、さらに、動きベクトル検出の精度を向上させることができ、その結果、求められる動きベクトルもより確からしいものとすることができる。   In addition, when the pixel difference in the calculation block is larger than the predetermined pixel difference value and the number of pixels that are not used for the gradient method calculation is larger than the predetermined threshold value, the gradient method calculation processing is adaptively performed. Therefore, the accuracy of motion vector detection can be further improved especially at the boundary of the motion of the object, and as a result, the required motion vector can be made more probable.

具体的には、演算ブロック内の画素差分が所定の画素差分値よりも大きく、勾配法演算に用いられない画素数が、所定のしきい値よりも多かった場合に、ブロック単位モードから画素単位モードに変更し、検出対象ブロックの画素毎に演算ブロックを設定し、有効判定処理および勾配法演算処理を行うようにしたので、画素によっては、より高精度な動きベクトルを検出することができる。また、演算ブロック内の画素差分が所定の画素差分値よりも大きく、勾配法演算に用いられない画素数が、所定のしきい値よりも多かった場合に、勾配法演算処理の処理を打ち切り、0ベクトルとするようにしたので、暴れた動きベクトルの検出を抑制し、より安全な動きベクトルを検出することができる。   Specifically, when the pixel difference in the calculation block is larger than the predetermined pixel difference value and the number of pixels that are not used in the gradient method calculation is larger than the predetermined threshold value, the block unit mode is changed to the pixel unit. Since the calculation block is set for each pixel of the detection target block and the validity determination process and the gradient method calculation process are performed, the motion vector can be detected with higher accuracy depending on the pixel. In addition, when the pixel difference in the calculation block is larger than the predetermined pixel difference value and the number of pixels that are not used for the gradient method calculation is larger than the predetermined threshold value, the gradient method calculation processing is discontinued, Since the zero vector is used, detection of a violent motion vector can be suppressed and a safer motion vector can be detected.

次に、ベクトル割付部54の構成の詳細について説明する。   Next, details of the configuration of the vector allocation unit 54 will be described.

図38は、ベクトル割付部54の構成を示すブロック図である。図38に構成を示すベクトル割付部54は、24P信号の入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、フレームt上において検出された動きベクトルを、割付ベクトルメモリ55上の、補間する60P信号の内挿フレーム上の画素に割り付ける処理を行う。   FIG. 38 is a block diagram showing a configuration of the vector allocating unit 54. The vector allocating unit 54 having the configuration shown in FIG. 38 allocates motion vectors detected on the frame t using the frame t of the image at time t to which the 24P signal is input and the frame t + 1 of the image at time t + 1. A process of assigning to the pixels on the interpolation frame of the 60P signal to be interpolated on the vector memory 55 is performed.

図38の例において、時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1は、画素情報演算部701、評価値演算部702、および着目画素差分演算部703に入力される。   In the example of FIG. 38, the frame t of the image at time t and the frame t + 1 of the image at time t + 1 are input to the pixel information calculation unit 701, the evaluation value calculation unit 702, and the target pixel difference calculation unit 703.

画素情報演算部701は、検出ベクトルメモリ53のフレームt上の画素に検出された動きベクトルを、左上の画素からラスタスキャン順に取得し、取得した動きベクトルを、次の時刻のフレームt+1方向に延ばし、延ばした動きベクトルと、内挿フレームとの交点を算出する。そして、画素情報演算部701は、算出された動きベクトルと内挿フレームとの交点から、内挿フレーム上において、その動きベクトルの割付対象となる画素(以下、割付対象画素と称する)を設定し、動きベクトルおよび割付対象画素の位置の情報を、ベクトル選択部705に出力する。また、画像情報演算部701は、割付対象画素と、動きベクトルで対応付けられるフレームtの位置Pおよびフレームt+1上の位置Qを算出し、算出されたフレームtおよびフレームt+1上の位置情報を、評価値演算部702、および着目画素差分演算部703に出力する。   The pixel information calculation unit 701 acquires the motion vector detected by the pixel on the frame t in the detection vector memory 53 in the raster scan order from the upper left pixel, and extends the acquired motion vector in the frame t + 1 direction at the next time. The intersection of the extended motion vector and the interpolation frame is calculated. Then, the pixel information calculation unit 701 sets, from the intersection of the calculated motion vector and the interpolation frame, a pixel (hereinafter referred to as an allocation target pixel) to which the motion vector is assigned on the interpolation frame. The motion vector and the position information of the allocation target pixel are output to the vector selection unit 705. The image information calculation unit 701 calculates the position P of the frame t and the position Q on the frame t + 1 that are associated with the allocation target pixel and the motion vector, and the calculated position information on the frame t and the frame t + 1 The result is output to the evaluation value calculation unit 702 and the target pixel difference calculation unit 703.

評価値演算部702は、画素情報演算部701から、割付対象画素と、動きベクトルで対応付けられるフレームtおよびフレームt+1上の位置情報を入力すると、フレームtの位置Pおよびフレームt+1の位置Qの評価値DFDを演算するため、位置Pおよび位置Qを中心とした一定範囲のDFD演算範囲(m×n)をそれぞれ設定し、それらのDFD演算範囲が画枠内にあるか否かを判断する。評価値演算部702は、DFD演算範囲が画枠内にあると判断した場合、このDFD演算範囲を用いて演算することにより、動きベクトルに対する割付対象画素の評価値DFDを求め、求めた評価値DFDを、ベクトル評価部704に出力する。   When the evaluation value calculation unit 702 receives from the pixel information calculation unit 701 position information on the frame t and the frame t + 1 associated with the allocation target pixel and the motion vector, the evaluation value calculation unit 702 receives the position P of the frame t and the position Q of the frame t + 1. In order to calculate the evaluation value DFD, a certain range of DFD calculation ranges (m × n) centering on the position P and the position Q are respectively set, and it is determined whether or not these DFD calculation ranges are within the image frame. . When the evaluation value calculation unit 702 determines that the DFD calculation range is within the image frame, the evaluation value calculation unit 702 calculates the evaluation value DFD of the allocation target pixel for the motion vector by calculating using the DFD calculation range, and the calculated evaluation value The DFD is output to the vector evaluation unit 704.

着目画素差分演算部703は、画素情報演算部701から、割付対象画素と、動きベクトルで対応付けられるフレームtおよびフレームt+1上の位置情報を入力すると、フレームtの位置Pおよびフレームt+1の位置Qを用いて、割付対象画素に対する輝度差分絶対値を求め、求めた輝度差分絶対値を、ベクトル評価部704に出力する。   When the pixel-of-interest difference calculation unit 703 receives from the pixel information calculation unit 701 position information on the frame t and the frame t + 1 associated with the allocation target pixel and the motion vector, the position P of the frame t and the position Q of the frame t + 1 Is used to obtain the absolute value of the luminance difference for the allocation target pixel, and the obtained absolute value of the luminance difference is output to the vector evaluation unit 704.

ベクトル評価部704は、画素差分判断部711および評価値判断部712により構成される。画素差分判断部711は、着目画素差分演算部703から入力された割付対象画素に対する輝度差分絶対値が所定のしきい値よりも小さいか否かを判断する。評価値判断部712は、画素差分判断部711により着目画素差分演算部703から入力された割付対象画素に対する輝度差分絶対値が所定のしきい値よりも小さいと判断された場合に、評価値演算部702から入力された割付対象画素の評価値DFDが、ベクトル選択部705が有するDFDテーブルの最小評価値より小さいか否かを判断する。そして、評価値判断部712は、割付対象画素の評価値DFDが、DFDテーブルの最小評価値より小さいと判断した場合に、割付対象画素が対応する動きベクトルの信頼度が高いと判断し、ベクトル選択部705に、割付対象画素の評価値DFDを出力する。   The vector evaluation unit 704 includes a pixel difference determination unit 711 and an evaluation value determination unit 712. The pixel difference determination unit 711 determines whether the luminance difference absolute value for the allocation target pixel input from the target pixel difference calculation unit 703 is smaller than a predetermined threshold value. The evaluation value determination unit 712 calculates the evaluation value when the pixel difference determination unit 711 determines that the luminance difference absolute value for the allocation target pixel input from the target pixel difference calculation unit 703 is smaller than a predetermined threshold value. It is determined whether the evaluation value DFD of the allocation target pixel input from the unit 702 is smaller than the minimum evaluation value of the DFD table included in the vector selection unit 705. When the evaluation value determination unit 712 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 712 determines that the reliability of the motion vector corresponding to the allocation target pixel is high, The evaluation value DFD of the allocation target pixel is output to the selection unit 705.

ベクトル選択部705は、内挿フレーム上の各画素における最小評価値を保持するDFDテーブルを有しており、内挿フレーム上の各画素に対して、0ベクトルを割り付けた場合の評価値DFD0を、内挿フレーム上の各画素における最小評価値としてDFDテーブルに予め保持している。ベクトル選択部705は、ベクトル評価部704からの割付対象画素の評価値DFDを入力すると、画素情報演算部701からの割付対象画素の位置の情報に基づいて、割付フラグメモリ56のフラグを1(true)に書き換え、割付対象画素のDFDテーブルの最小評価値を、その割付対象画素の評価値DFDに書き換える。また、ベクトル選択部705は、画素情報演算部701からの割付対象画素の位置の情報に基づいて、割付ベクトルメモリ55の割付対象画素に、画素情報演算部701からの動きベクトルを割り付ける。   The vector selection unit 705 has a DFD table that holds a minimum evaluation value at each pixel on the interpolation frame, and an evaluation value DFD0 when a 0 vector is assigned to each pixel on the interpolation frame. The DFD table holds the minimum evaluation value for each pixel on the interpolation frame in advance. When the vector selection unit 705 receives the evaluation value DFD of the allocation target pixel from the vector evaluation unit 704, the vector selection unit 705 sets the flag of the allocation flag memory 56 to 1 (based on the position information of the allocation target pixel from the pixel information calculation unit 701). 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 705 allocates the motion vector from the pixel information calculation unit 701 to the allocation target pixel in the allocation vector memory 55 based on the information on the position of the allocation target pixel from the pixel information calculation unit 701.

次に、動きベクトルの画素以下精度を説明する。上述した式(1)で表される評価値DFDの演算においては、フレームtの画素位置pをベクトルv量分ずらした先のフレームt+1上の位相p+vは、実際には、24p信号のフレームt+1上の画素位置と一致しない場合が多く、その場合の輝度値は定義されていない。したがって、画素以下精度を有する動きベクトルvに対する評価値DFDの演算を行うためには、画素以下の位相における輝度値を何らかの方法で生成しなければならない。   Next, the accuracy below the pixel of the motion vector will be described. In the calculation of the evaluation value DFD represented by the above equation (1), 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 is actually the frame t + 1 of the 24p signal. In many cases, it does not coincide with the upper pixel position, and the luminance value in that case is not defined. Therefore, in order to perform the calculation of the evaluation value DFD for the motion vector v having subpixel accuracy, it is necessary to generate a luminance value in a phase below the pixel by some method.

これに対応して、フレームtの画素位置pをベクトルv量分ずらした先のフレームt+1上の位相p+vに最も近い画素の輝度値をそのまま用いる方法がある。しかしながら、この方法では、評価する動きベクトルの画素以下成分を丸めてしまうため、動きベクトルの画素以下成分を捨てていることになり、これにより求められた評価値DFDの信頼度は、低くなってしまう。   Corresponding to this, there is a method of using the luminance value of the pixel closest to the phase p + v on the previous frame t + 1 obtained by shifting the pixel position p of the frame t by the vector v amount. However, in this method, since the sub-pixel components of the motion vector to be evaluated are rounded, the sub-pixel components of the motion vector are discarded, and the reliability of the evaluation value DFD thus obtained is lowered. End up.

そこで、本発明においては、周辺4画素の輝度値による4点補間処理を用いている。図39は、本発明の4点補間処理の概念を示す図である。図39においては、矢印Xが、フレームt+1における水平方向を示しており、矢印Yが、フレームt+1における垂直方向を示している。このフレームt+1において、白丸は、フレームt+1上の画素位置を表しており、黒点は、画素以下の位置を表している。また、フレームt+1上における最左上の黒点p+vとその周辺4画素は、ウインドウEに拡大して示されている。ウインドウEにおいて、白丸内のアルファベットは、周辺4画素の輝度値を示している。   Therefore, in the present invention, a four-point interpolation process using the luminance values of the surrounding four pixels is used. FIG. 39 is a diagram showing the concept of the four-point interpolation process of the present invention. In FIG. 39, the arrow X indicates the horizontal direction in the frame t + 1, and the arrow Y indicates the vertical direction in the frame t + 1. In this frame t + 1, the white circle represents the pixel position on the frame t + 1, and the black dot represents the position below the pixel. Further, the upper left black point p + v and its surrounding four pixels on the frame t + 1 are shown enlarged in the window E. 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)で表される。 If the black point p + v at the upper left in the frame t + 1 is the phase p + v after the pixel position p of the frame t is shifted by the vector v amount, the luminance value F t + 1 (p + v) of the phase p + v is the horizontal direction of the phase p + v. The pixel sub-component α and the pixel sub-component β in the vertical direction and the luminance values L0 to L4 of the four surrounding pixels of the phase p + v are used to obtain the sum of the inverse ratios of the distances of the four surrounding pixels. That is, the luminance value F t + 1 (p + v) is expressed by the following equation (12).

t+1(p+v) = (1−α)(1−β)L0+α(1−β)L1
+(1−α)βL2+αβL3 ・・・(12)
F t + 1 (p + v) = (1-α) (1-β) L0 + α (1-β) L1
+ (1-α) βL2 + αβL3 (12)

以上のように、4点補間処理により求められる輝度値Ft+1(p+v)を用いて、DFD評価の演算を行うことにより、ハードウェア実装上のコストを引き上げることなく、評価値DFDの信頼度の低下を抑制することができる。なお、以下においては、ベクトル割付の際の評価値DFDや輝度差分絶対値などの演算において、この4点補間を適用した例を説明するが、もちろん、上述した初期ベクトル選択処理やベクトル検出処理、または、後述する割付補償処理などのベクトルを評価する場合の評価値DFDの演算においても、この4点補間は適用される。 As described above, the calculation of the DFD evaluation is performed using the luminance value F t + 1 (p + v) obtained by the four-point interpolation process, so that the reliability of the evaluation value DFD can be increased without increasing the hardware implementation cost. A decrease in the degree can be suppressed. In the following, an example in which the four-point interpolation is applied in the calculation of the evaluation value DFD and the luminance difference absolute value at the time of vector allocation will be described. Of course, the above-described initial vector selection processing, vector detection processing, Alternatively, this four-point interpolation is also applied to the calculation of the evaluation value DFD in the case of evaluating a vector such as allocation compensation processing described later.

次に、ベクトル割付処理の概念を説明する。例えば、24P信号上でオブジェクトが速度vで動いており、任意の2フレーム間で、このオブジェクトの動きについて等速仮定が成り立つと仮定した場合に、24P信号のフレーム間に、新しくフレームを内挿することを考える。この場合、24P信号のオブジェクトから動きベクトルvを延ばすと、動きベクトルvと内挿フレームとの交点は、同じオブジェクトであり、同じ速度vを有する。   Next, the concept of vector allocation processing will be described. For example, when it is assumed that an object is moving at a velocity v on a 24P signal and a constant velocity assumption is made for the motion of the object between any two frames, a new frame is interpolated between the frames of the 24P signal. Think about what to do. 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 and has the same velocity v.

したがって、ベクトル検出部53で検出された24P信号のフレーム(以下、内挿フレームに対して、元フレームとも称する)の動きベクトルを、その動きベクトルと、内挿する60P信号の内挿フレーム上との交点に割り付けることで、内挿フレーム上の各画素の動きを求めることができる。また、逆に、割り付けられた動きベクトルから、内挿フレーム上の画素が24P信号フレーム上でどの位置から動いたものなのかを求めることができる。   Therefore, the motion vector of the frame of the 24P signal detected by the vector detection unit 53 (hereinafter also referred to as an original frame with respect to the interpolation frame) is represented by the motion vector and the interpolation frame of the 60P signal to be interpolated. By assigning them to the intersections, the movement of each pixel on the interpolation frame can be obtained. Conversely, from the allocated motion vector, it can be determined from which position the pixel on the interpolation frame has moved on the 24P signal frame.

図40は、24P信号の元フレームで検出された動きベクトルと、60P信号の内挿フレーム上の画素の例を1次元で示している。図40の例においては、2つの24P信号の時刻tのフレームtおよび時刻t+1のフレームt+1の間に、例えば、時刻t+0.4の内挿フレームF1、および時刻t+0.8の内挿フレームF2が2つ挿入されている。なお、この内挿フレームの位置は、上述したように、24P信号上での時間位相が0.0,0.4,0.8,1.2,および1.6となる位置に、60P信号のフレームが置かれることから、信号処理装置1において予め設定されている。   FIG. 40 shows one-dimensional examples of motion vectors detected in the original frame of the 24P signal and pixels on the interpolation frame of the 60P signal. In the example of FIG. 40, between the frame t at the time t and the frame t + 1 at the time t + 1 of the two 24P signals, for example, the interpolation frame F1 at the time t + 0.4 and the interpolation frame F2 at the time t + 0.8 are Two are inserted. As described above, the position of this interpolation frame is the position where the time phase on the 24P signal is 0.0, 0.4, 0.8, 1.2, and 1.6, and the 60P signal. Are set in advance in the signal processing apparatus 1.

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

したがって、フレームtの左側の画素から、フレームt+1の左から4,5番目の画素近傍への動きベクトルv1は、内挿フレームF1上の左から2番目と3番目の画素の間、内挿フレームF2上の左から3番目と4番目の画素の間を通っている。したがって、動きベクトルv1は、動きベクトルv1が内挿フレームF1およびF2を交差する点の近傍N1に含まれる画素(内挿フレームF1の左から2番目と3番目の画素および内挿フレームF2の左から3番目と4番目の画素)に割り付けられる割付候補ベクトルとなる。   Accordingly, 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 between the second and third pixels from the left on the interpolation frame F1. It passes between the third and fourth pixels from the left on F2. Therefore, the motion vector v1 is a pixel included in the vicinity N1 of the point where the motion vector v1 intersects the interpolation frames F1 and F2 (second and third pixels from the left of the interpolation frame F1 and the left of the interpolation frame F2). To the third and fourth pixels).

また、フレームtの左から3番目の画素から、フレームt+1の左から2,3番目の画素近傍への動きベクトルv2は、内挿フレームF1上の左から2番目と3番目の画素の間、内挿フレームF2上の左から2番目と3番目の画素の間を通っている。したがって、動きベクトルv2は、動きベクトルv2が内挿フレームF1およびF2を交差する点の近傍領域N2に含まれる画素(内挿フレームF1の左から2番目と3番目の画素および内挿フレームF2の左から2番目と3番目の画素)に割り付けられる割付候補ベクトルとなる。   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 on the interpolation frame F1, It passes between the second and third pixels from the left on the interpolation frame F2. Therefore, the motion vector v2 is a pixel included in the vicinity region N2 of the point where the motion vector v2 intersects the interpolation frames F1 and F2 (second and third pixels from the left of the interpolation frame F1 and the interpolation frame F2). Allocation candidate vectors to be allocated to the second and third pixels from the left).

さらに、フレームtの左から5番目の画素から、フレームt+1の左から4,5番目の画素近傍への動きベクトルv3は、内挿フレームF1上の左から4番目と5番目の画素の間、内挿フレームF2上の左から4番目と5番目の画素の間を通っている。したがって、動きベクトルv3は、動きベクトルv3が内挿フレームF1およびF2を交差する点の近傍領域N3に含まれる画素(内挿フレームF1の左から4番目と5番目の画素および内挿フレームF2の左から4番目と5番目の画素)に割り付けられる割付候補ベクトルとなる。   Furthermore, 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 between the fourth and fifth pixels from the left on the interpolation frame F1, It passes between the fourth and fifth pixels from the left on the interpolation frame F2. Therefore, the motion vector v3 includes the pixels included in the vicinity region N3 of the point where the motion vector v3 intersects the interpolation frames F1 and F2 (the fourth and fifth pixels from the left of the interpolation frame F1 and the interpolation frame F2). 4th and 5th pixels from the left).

すなわち、内挿フレームF2の左から2番目の画素の割付候補ベクトルは、動きベクトルv2であり、内挿フレームF1上の左から2番目および3番目の画素、並びに内挿フレームF2の左から3番目の画素の割付候補ベクトルは、動きベクトルv1およびv2である。また、内挿フレームF2の左から4番目の画素の割付候補ベクトルは、動きベクトルv1およびv3であり、内挿フレームF1上の左から4番目および5番目の画素、並びに内挿フレームF2の左から5番目の画素の割付候補ベクトルは、動きベクトルv3である。   That is, the allocation candidate vector of the second pixel from the left of the interpolation frame F2 is the motion vector v2, and the second and third pixels from the left on the interpolation frame F1, and 3 from the left of the interpolation frame F2. The allocation candidate vectors of the th pixel are motion vectors v1 and v2. Further, the allocation candidate vectors of the fourth pixel from the left of the interpolation frame F2 are motion vectors v1 and v3, the fourth and fifth pixels from the left on the interpolation frame F1, and the left of the interpolation frame F2. The fifth pixel allocation candidate vector from is the motion vector v3.

以上のように、元フレームにおいて検出された動きベクトルの中から、内挿フレーム上の各画素に割り付けられる割付候補ベクトルが求められる。なお、内挿フレームF1およびF2の左端の画素および右端の画素(図中黒丸)においては、近傍を通る動きベクトルは、示されていない。すなわち、内挿フレームF1およびF2の左端の画素および右端の画素には、割り付けられる割付候補ベクトルが存在しない。したがって、これらの画素については、後述する後段の割付補償部57において割付補償処理が実行される。   As described above, an allocation candidate vector to be allocated to each pixel on the interpolation frame is obtained from the motion vectors detected in the original frame. In the leftmost pixel and the rightmost pixel (black circles in the figure) of the interpolation frames F1 and F2, motion vectors passing through the vicinity are not shown. That is, there is no allocation candidate vector to be allocated to the leftmost pixel and the rightmost pixel of the interpolation frames F1 and F2. Therefore, an allocation compensation process is performed on these pixels in an allocation compensation unit 57 in a later stage described later.

さらに、図41を参照して、元フレームで検出された動きベクトルと、60P信号の内挿フレーム上の画素について詳しく説明する。図41の例において、矢印Tは、図中、左前の時刻tのフレームtから、右奥の時刻t+1のフレームt+1への時間の経過方向を示している。また、時刻tと時刻t+1の間の時刻t+postに内挿フレームF1が置かれている。 Furthermore, with reference to FIG. 41, the motion vector detected in the original frame and the pixels on the interpolation frame of the 60P signal will be described in detail. In the example of FIG. 41, the arrow T indicates the direction of time passage from the frame t at the time t at the left front in the figure to the frame t + 1 at the time t + 1 at the back right. Further, interpolation frame F1 is placed at time t + pos t between times t and time t + 1.

図41の例の場合、フレームt上の画素(xa,ya)で検出された動きベクトルva(xva,yva)をフレームt+1方向に延ばし、内挿フレームF1との交点(xia,yia)を演算する。交点は、24P信号のフレームt上の動きベクトルvaの端点にあたる画素が移動した点であると考えられるので、具体的には、式(13)および式(14)のように表される。 In the example of FIG. 41, the motion vector v a (x va , y va ) detected by the pixel (x a , y a ) on the frame t is extended in the frame t + 1 direction, and the intersection (x ia , y ia ) is calculated. Intersection, it is considered that pixels corresponding to end points of the motion vector v a of the frame t of the 24P signal to a point moved, specifically, is expressed by the equation (13) and (14).

ia = xa+postva ・・・(13)
ia = ya+postva ・・・(14)
x ia = x a + pos t x va ··· (13)
y ia = y a + pos t y va ··· (14)

ここで、上述したように、動きベクトルvaが画素以下精度を有する場合には、動きベクトルvaの交点と、内挿フレームF1上の画素位置は、一致するとは限らない。一致しない場合、図41に示されるように、動きベクトルvaは、内挿フレームF1上の交点の近傍4画素G1乃至G4に対して割り付けられる。すなわち、動きベクトルvaは、近傍の各画素G1乃至G4上にシフト(平行移動)されて、それぞれの画素に対して割り付けられる割付候補ベクトルとされ、割付補償処理が実行される。 Here, as described above, when the motion vector v a has a less precision pixels, the intersection of the motion vector v a, pixel positions on the interpolation frame F1 does not always match. Otherwise, as shown in FIG. 41, the motion vector v a is allocated with respect to the four neighboring pixels G1 to G4 of the intersection on the interpolated frame F1. That is, the motion vector v a is shifted (parallel movement) on each of the pixels G1 to G4 in the neighborhood, is the allocation candidate vector to be allocated to each of the pixels, the allocation compensating process is executed.

なお、このように、1つの動きベクトルが、近傍4画素に対して割り付けられる候補となることもあるため、画素によっては、複数の動きベクトルが割付候補ベクトルとされる。この場合、ベクトル割付部54は、各動きベクトルについて、内挿フレーム上の画素と、その動きベクトルで対応付けられる元フレーム上の交点を算出し、その交点を用いて、各動きベクトルを評価することにより、最終的に、内挿フレーム上の画素に、割り付ける動きベクトルを決定する。   As described above, since one motion vector may be a candidate assigned to four neighboring pixels, a plurality of motion vectors may be assigned candidate vectors depending on the pixel. In this case, the vector allocating unit 54 calculates, for each motion vector, a pixel on the interpolation frame and an intersection point on the original frame associated with the motion vector, and evaluates each motion vector using the intersection point. Thus, finally, a motion vector to be assigned to the pixel on the interpolation frame is determined.

図42を参照して、ベクトル割付部54における動きベクトルの評価について説明する。図42は、下から、図41の時刻tのフレームt、時刻t+postの内挿フレームF1、および、時刻t+1のフレームt+1を、1次元的に示している。 With reference to FIG. 42, the motion vector evaluation in the vector allocation unit 54 will be described. Figure 42 is a bottom, frame t at time t in FIG. 41, the time t + pos t interpolated frame F1, and the frame t + 1 at time t + 1, is one-dimensionally illustrated.

図42の例において、動きベクトルsvaは、フレームt上の画素(xa,ya)において検出された動きベクトルvaが、近傍の画素G4の割付候補ベクトルとして、画素G4上にシフト(平行移動)されたものである。ここで、画素G4上にシフトされた動きベクトルsvaと、フレームtおよびフレームt+1との交点を、それぞれ点Pおよび点Qとする。 In the example of FIG. 42, the motion vector sv a is the pixel (x a, y a) of the frame t detected motion vector v a at is as allocation candidate vectors of the pixels in the neighborhood G4, shifts on the pixel G4 ( Translated). Here, the intersections of the motion vector sva, shifted onto the pixel G4, and the frame t and the frame t + 1 are defined as a point P and a point Q, respectively.

ベクトル割付部54は、動きベクトルsvaの第1の評価として、まず、点Pおよび点Qを中心としたDFD演算範囲をそれぞれ求め、求めたDFD演算範囲が画枠をはみ出してしまうか否かを判断する。したがって、点Pおよび点Qを中心としたDFD演算範囲が画枠をはみ出てしまった場合には、動きベクトルsvaは、候補から除外される。 The vector allocating unit 54, a first evaluation of motion vector sv a, first, obtains a DFD operation range around the point P and point Q respectively, DFD operation range determined whether jutting out the image frame Judging. Therefore, when the DFD operation range around the point P and point Q had protruding a picture frame, the motion vector sv a is excluded from the candidates.

また、この点Pおよび点Qが、例えば、異なるオブジェクトに属する場合、点Pの輝度値Ft(P)と、点Qの輝度値Ft+1(Q)の差は、大きくなってしまう。したがって、ベクトル割付部54は、動きベクトルsvaの第2の評価として、点Pと点Qを用いて、画素G4における輝度差分絶対値dpを求め、輝度差分絶対値dpが所定の値より大きいか否かを判断する。輝度差分絶対値dpが所定の値より大きいと判断された場合には、画素G4における動きベクトルsvaの信頼度が低いとされ、動きベクトルsvaは、候補から除外される。なお、輝度差分絶対値dpは、次の式(15)で表される。 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 54, 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 Determine whether or not. If the luminance difference absolute value dp is determined to be larger than the predetermined value is a low reliability of the motion vector sv a in the pixel G4, a motion vector sv a is excluded from the candidates. The luminance difference absolute value dp is expressed by the following equation (15).

dp = |Ft(P)− Ft+1(Q)| ・・・(15) dp = | F t (P) − F t + 1 (Q) | (15)

そして、動きベクトルsvaの第3の評価として、ベクトル割付部54は、点Pおよび点Qを中心としたDFD演算範囲の相関値を表す差分絶対値による評価判断を行う。すなわち、ベクトル割付部54は、点Pおよび点Qを中心としたDFD演算範囲を用いて、画素G4における動きベクトルsvaの評価値DFD(差分絶対値)を求め、求められた評価値DFDがDFDテーブルの最小評価値よりも小さいか否かを判断する。以上の評価の結果、ベクトル割付部54は、求められた評価値DFDの中で最小の評価値DFDを有する動きベクトルを、画素G4に割り付ける。 Then, as the third evaluation of the motion vector sv a, the vector allocating unit 54 performs evaluation determined 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 54, using the DFD operation range around the point P and the point Q, obtains the evaluated value DFD of the motion vector sv a (absolute differences) in the pixel G4, obtained evaluation value DFD is It is determined whether or not it is smaller than the minimum evaluation value of the DFD table. As a result of the above evaluation, the vector assigning unit 54 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, since the motion vector of the allocation candidate in the pixel of the interpolation frame is evaluated using not only the evaluation value DFD of the allocation target pixel but also the luminance difference absolute value in the allocation target pixel, the conventional evaluation Rather than using only the value DFD, a reliable motion vector can be allocated to the allocation target pixel. As a result, the accuracy of vector allocation is improved.

なお、上述したように内挿フレームの画素における割付候補の動きベクトルを評価するためには、内挿フレームの画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置が用いられるが、輝度差分絶対値dpおよび評価値DFDを求める際に、割付候補の動きベクトルは、内挿フレームの画素位置を基準に延長するため、動きベクトルと元フレーム上の交点は、元フレームの画素位置と一致しないことがあり、このままでは画素値を求めることができない。このような場合に、図39を参照して上述した4点補間処理が実行される。   As described above, in order to evaluate the motion vector of the allocation candidate in the pixel of the interpolation frame, the position on the original frame associated with the motion vector is used with reference to the pixel of the interpolation frame. When obtaining the luminance difference absolute value dp and the evaluation value DFD, the motion vector of the allocation candidate is extended with reference to the pixel position of the interpolation frame, so that the intersection of the motion vector and the original frame is the pixel position of the original frame. The pixel values may not match, and the pixel value cannot be obtained as it is. In such a case, the four-point interpolation process described above with reference to FIG. 39 is executed.

図43は、ベクトル割付処理における4点補間の例を示している。図43において、図41および図42における場合と対応する部分には対応する符号を付してあり、その説明は繰り返しになるので省略する。   FIG. 43 shows an example of four-point interpolation in the vector allocation process. In FIG. 43, portions corresponding to those in FIGS. 41 and 42 are denoted by the corresponding reference numerals, and the description thereof will be omitted because it will be repeated.

図43の例においては、割付候補の動きベクトルsvaは、内挿フレームF1の画素位置G4を基準に延長されているため、動きベクトルsvaとフレームtとの交点Pは、フレームt上の画素位置(フレームt上の白丸)と一致しておらず、また、動きベクトルsvaとフレームt+1との交点Qも、フレームt+1上の画素位置(フレームt上の白丸)と一致していない。したがって、フレームtおよびフレームt+1においては、それぞれ交点Pおよび交点Qを中心とした近傍Eの4画素(フレームtおよびフレームt+1上の白丸)を用いて、上述した4点補間演算が行なわれ、交点Pおよび交点Qの画素値が求められる。 In the example of FIG. 43, the motion vector sv a assignment candidate, because it is extended pixel position G4 in interpolated frame F1 as a reference, the point of intersection P between the motion vector sv a frame t, in frame t does not coincide with the pixel position (white circle on the frame t), also intersecting point Q between the motion vector sv a frame t + 1 also does not match the pixel positions on the frame t + 1 (open circles in frame t). Therefore, in the frame t and the frame t + 1, the above-described four-point interpolation is performed using the four pixels in the vicinity E centered at the intersection point P and the intersection point Q (white circles on the frame t and the frame t + 1), respectively. Pixel values of P and intersection point Q are obtained.

このように、本発明のベクトル割付処理においては、4点補間処理により求められる交点Pおよび交点Qの画素値が用いられて、輝度差分絶対値dpおよび評価値DFDが演算されるので、従来の画素以下成分を丸めてしまう方法よりも、輝度差分絶対値dpや評価値DFDを精度よく求めることができる。   As described above, in the vector allocation processing of the present invention, the luminance difference absolute value dp and the evaluation value DFD are calculated using the pixel values of the intersection P and the intersection Q obtained by the four-point interpolation processing. The luminance difference absolute value dp and the evaluation value DFD can be obtained with higher accuracy than the method of rounding the sub-pixel components.

次に、図44のフローチャートを参照して、ベクトル割付処理の詳細を説明する。24P信号の元フレームである、時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1は、画素情報演算部701、評価値演算部702、および着目画素差分演算部703に入力される。   Next, details of the vector allocation processing will be described with reference to the flowchart of FIG. The frame t of the image at time t and the frame t + 1 of the image at time t + 1, which are the original frames of the 24P signal, are input to the pixel information calculation unit 701, the evaluation value calculation unit 702, and the target pixel difference calculation unit 703.

画素情報演算部701は、新しい元フレームが入力されると、ベクトル選択部705を制御し、ステップS701において、割付フラグメモリ56の割付フラグを0(False)で初期化させ、ステップS702に進み、割付ベクトルメモリ55を0ベクトルで初期化させ、ステップS703に進む。これにより、結果的に、動きベクトルが割り付けられない画素に、0ベクトルが割り付けられる。   When a new original frame is input, the pixel information calculation unit 701 controls the vector selection unit 705, initializes the allocation flag of the allocation flag memory 56 to 0 (False) in step S701, and proceeds to step S702. The allocation vector memory 55 is initialized with the 0 vector, and the process proceeds to step S703. As a result, a zero vector is assigned to a pixel to which no motion vector is assigned.

また、画素情報演算部701は、ステップS703において、評価値演算部702を制御し、内挿フレーム上のすべての画素に対して、0ベクトルを用いて評価値DFD0を算出させ、ベクトル選択部705を制御し、評価値演算部702により算出された0ベクトルの評価値DFD0を、内挿フレームの各画素に対する最小評価値としてDFDテーブルに記憶させ、ステップS704に進む。すなわち、ステップS703において、評価値演算部702は、内挿フレームすべての画素に対して、0ベクトルを用いて評価値DFD0を算出し、算出した評価値DFD0を、ベクトル評価部704を介して、ベクトル選択部705に出力する。そして、ベクトル選択部705は、ベクトル評価部704を介して入力された評価値DFD0を、DFDテーブルの対応する画素の最小評価値として記憶する。   In step S703, the pixel information calculation unit 701 controls the evaluation value calculation unit 702 to calculate the evaluation value DFD0 using the 0 vector for all the pixels on the interpolation frame, and the vector selection unit 705. And the evaluation value DFD0 of the 0 vector calculated by the evaluation value calculation unit 702 is stored in the DFD table as the minimum evaluation value for each pixel of the interpolation frame, and the process proceeds to step S704. That is, in step S703, the evaluation value calculation unit 702 calculates the evaluation value DFD0 using the 0 vector for all the pixels in the interpolation frame, and the calculated evaluation value DFD0 is passed through the vector evaluation unit 704. The data is output to the vector selection unit 705. Then, the vector selection unit 705 stores the evaluation value DFD0 input via the vector evaluation unit 704 as the minimum evaluation value of the corresponding pixel in the DFD table.

画素情報演算部701は、ステップS704において、検出ベクトルメモリ53上の元フレームから画素を選択し、ステップS705に進む。なお、この場合、フレームの左上からラスタスキャン順に画素が選択される。   In step S704, the pixel information calculation unit 701 selects a pixel from the original frame on the detection vector memory 53, and proceeds to step S705. In this case, pixels are selected in the raster scan order from the upper left of the frame.

画素情報演算部701は、ステップS705において、画素位置演算処理を実行し、ステップS706に進む。この画素位置演算処理の詳細は、図45を参照して後述するが、この画素位置演算処理により、ステップS704において選択された画素において検出された動きベクトルが割り付けられる対象となる内挿フレーム上の割付対象画素が算出され、算出された割付対象画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置が算出される。   In step S705, the pixel information calculation unit 701 performs pixel position calculation processing, and proceeds to step S706. The details of this pixel position calculation process will be described later with reference to FIG. 45, but this pixel position calculation process allows the motion vector detected in the pixel selected in step S704 to be assigned to the interpolation frame. An allocation target pixel is calculated, and a position on the original frame associated with the motion vector is calculated on the basis of the calculated allocation target pixel.

画素情報演算部701は、ステップS706において、算出された割付対象画素を選択し、選択した割付対象画素と、その動きベクトルを、ベクトル選択部705に出力し、ステップS707に進む。このとき、同時に、画素情報演算部701は、選択した割付対象画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置の情報を、評価値演算部702および着目画素演算部703に出力する。なお、ステップS706において、画素情報演算部701は、割付対象画素が複数存在する場合には、左上の画素から選択する。   In step S706, the pixel information calculation unit 701 selects the calculated allocation target pixel, outputs the selected allocation target pixel and its motion vector to the vector selection unit 705, and proceeds to step S707. At the same time, the pixel information calculation unit 701 outputs, to the evaluation value calculation unit 702 and the pixel-of-interest calculation unit 703, information on the position on the original frame associated with the motion vector based on the selected allocation target pixel. To do. In step S706, the pixel information calculation unit 701 selects an upper left pixel when there are a plurality of allocation target pixels.

ステップS707において、画素情報演算部701は、選択された割付対象画素に関して、割付ベクトル評価処理を実行し、ステップS708に進む。この割付ベクトル評価処理の詳細は、図46を参照して後述するが、この割付ベクトル評価処理により、割付対象画素における動きベクトルの評価値DFDおよび輝度差分絶対値が求められ、割付対象画素における動きベクトルの信頼度が判断され、これらの判断の結果、信頼度が高いとされた動きベクトルで、割付ベクトルメモリ55の動きベクトルが書き換えられる。   In step S707, the pixel information calculation unit 701 executes an allocation vector evaluation process for the selected allocation target pixel, and the process proceeds to step S708. Details of the allocation vector evaluation process will be described later with reference to FIG. 46. By this allocation vector evaluation process, the motion vector evaluation value DFD and the luminance difference absolute value in the allocation target pixel are obtained, and the motion in the allocation target pixel is determined. The reliability of the vector is determined, and the motion vector in the allocation vector memory 55 is rewritten with the motion vector determined to have high reliability as a result of these determinations.

画素情報演算部701は、ステップS708において、すべての割付対象画素の処理が終了したか否かを判断し、まだ、すべての割付対象画素の処理が終了していないと判断した場合には、ステップS706に戻り、次の割付対象画素を選択し、それ以降の処理を繰り返す。   In step S708, the pixel information calculation unit 701 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 yet been completed, Returning to S706, the next allocation target pixel is selected, and the subsequent processing is repeated.

ステップS708において、すべての割付対象画素の処理が終了したと判断された場合、画素情報演算部701は、ステップS709において、検出ベクトルメモリ53上の元フレームのすべての画素の処理を終了したか否かを判断する。画素情報演算部701は、ステップS709において、検出ベクトルメモリ53上の元フレームのすべての画素の処理を終了していないと判断した場合、ステップS704に戻り、検出ベクトルメモリ53上の元フレームの次の画素を選択し、それ以降の処理を繰り返す。また、画素情報演算部701は、ステップS709において、検出ベクトルメモリ53のすべての画素についての処理を終了したと判断した場合、ベクトル割付処理を終了する。   If it is determined in step S708 that the processing of all the allocation target pixels has been completed, the pixel information calculation unit 701 determines whether or not the processing of all the pixels of the original frame on the detection vector memory 53 has been completed in step S709. Determine whether. If the pixel information calculation unit 701 determines in step S709 that the processing of all the pixels of the original frame on the detection vector memory 53 has not been completed, the process returns to step S704 and the next of the original frame on the detection vector memory 53. This pixel is selected, and the subsequent processing is repeated. If the pixel information calculation unit 701 determines in step S709 that the process for all the pixels in the detection vector memory 53 has been completed, the pixel information calculation unit 701 ends the vector allocation process.

次に、図45のフローチャートを参照して、画素位置演算処理の詳細を説明する。なお、図45は、図44のステップS705の画素位置演算処理の例を示している。   Next, details of the pixel position calculation process will be described with reference to the flowchart of FIG. FIG. 45 shows an example of the pixel position calculation process in step S705 of FIG.

ステップS721において、画素情報演算部701は、ステップS704の処理により選択された画素で検出された動きベクトルを、検出メモリベクトル53から取得し、ステップS722に進む。なお、選択された画素の動きベクトルが0ベクトルである場合、割付ベクトルメモリ55には、初期値として0ベクトルが予め記憶されているので、以降のステップS722乃至S724、および、図44のステップS706乃至S708の処理はスキップされ、処理は、ステップS709に進む。   In step S721, the pixel information calculation unit 701 acquires the motion vector detected by the pixel selected by the process in step S704 from the detection memory vector 53, and the process proceeds to step S722. If the motion vector of the selected pixel is a 0 vector, the allocation vector memory 55 stores a 0 vector as an initial value in advance, so that the subsequent steps S722 to S724 and step S706 in FIG. 44 are performed. The processes from S708 to S708 are skipped, and the process proceeds to step S709.

画素情報演算部701は、ステップS722において、取得された動きベクトルと内挿フレームの交点を算出する。すなわち、画素情報演算部701は、取得した動きベクトルを、次フレームt+1方向に延ばし、延ばした動きベクトルと、内挿フレームとの交点を算出し、ステップS723に進む。   In step S722, the pixel information calculation unit 701 calculates the intersection of the acquired motion vector and the interpolation frame. That is, the pixel information calculation unit 701 extends the acquired motion vector in the direction of the next frame t + 1, calculates the intersection point of the extended motion vector and the interpolation frame, and proceeds to step S723.

画素情報演算部701は、ステップS723において、動きベクトルと内挿フレームから算出された交点から、割付対象画素を設定し、ステップS724に進む。このとき、画素情報演算部701は、交点が内挿フレーム上の画素位置に一致する場合には、交点を、割付対象画素に設定する。一方、画素情報演算部701は、交点が内挿フレーム上の画素位置に一致しない場合には、上述したように、内挿フレーム上の交点の近傍4画素を、割付対象画素に設定する。   In step S723, the pixel information calculation unit 701 sets an allocation target pixel from the intersection calculated from the motion vector and the interpolation frame, and proceeds to step S724. At this time, if the intersection point coincides with the pixel position on the interpolation frame, the pixel information calculation unit 701 sets the intersection point as the allocation target pixel. On the other hand, when the intersection does not coincide with the pixel position on the interpolation frame, the pixel information calculation unit 701 sets four pixels near the intersection on the interpolation frame as allocation target pixels as described above.

ステップS724において、画素情報演算部701は、評価値演算部702および着目画素差分演算部703が評価値DFDおよび輝度差分絶対値を求める上で必要である、各割付対象画素を基準に、取得された動きベクトルで対応付けた元フレーム上の位置を算出する。具体的には、画素情報演算部701は、ステップS724において、取得された動きベクトルを、設定された割付対象画素にシフト(平行移動)し、シフトされた動きベクトルと、元フレーム上の交点の位置を求め、画素位置演算処理を終了し、図43のステップS706に戻る。   In step S724, the pixel information calculation unit 701 is acquired with reference to each allocation target pixel, which is necessary for the evaluation value calculation unit 702 and the target pixel difference calculation unit 703 to obtain the evaluation value DFD and the luminance difference absolute value. The position on the original frame associated with the motion vector is calculated. Specifically, in step S724, the pixel information calculation unit 701 shifts (translates) the acquired motion vector to the set allocation target pixel, and the shifted motion vector and the intersection of the original frame The position is obtained, the pixel position calculation process is terminated, and the process returns to step S706 in FIG.

次に、図46のフローチャートを参照して、割付ベクトル評価処理の詳細を説明する。なお、図46は、図44のステップS707の割付ベクトル評価処理の例を示している。   Next, the details of the allocation vector evaluation process will be described with reference to the flowchart of FIG. 46 shows an example of the allocation vector evaluation process in step S707 of FIG.

図44のステップS706において、画素情報演算部701により、選択した割付対象画素を基準に、その動きベクトルで対応付けられる元フレーム上の位置が求められ、求められた元フレーム上の位置の情報が、評価値演算部702および着目画素差分演算部703に入力される。   In step S706 of FIG. 44, the pixel information calculation unit 701 obtains the position on the original frame associated with the motion vector with reference to the selected allocation target pixel, and information on the obtained position on the original frame is obtained. The evaluation value calculation unit 702 and the target pixel difference calculation unit 703 are input.

評価値演算部702は、画素情報演算部701から、元フレーム上の位置の情報が入力されると、ステップS741において、割付対象画素における動きベクトルの評価値DFDを求めるために、フレームtおよびフレームt+1上の位置を中心としたDFD演算範囲(m×n)をそれぞれ求め、ステップS742に進み、求められたDFD演算範囲が画枠内にあるか否かを判断する。評価値演算部702は、ステップS742において、DFD演算範囲が画枠からはみ出していると判断した場合、その動きベクトルは、割付対象画素に割り付ける割付候補ベクトルにはならないと判断し、ステップS743乃至S749の処理をスキップし、割付ベクトル評価処理を終了し、図44のステップS708に戻る。   When the position information on the original frame is input from the pixel information calculation unit 701 to the evaluation value calculation unit 702, in step S741, the evaluation value calculation unit 702 calculates the evaluation value DFD of the motion vector in the allocation target pixel by using the frame t and the frame Each DFD calculation range (m × n) centered on the position on t + 1 is obtained, and the process proceeds to step S742, where it is determined whether or not the obtained DFD calculation range is within the image frame. If the evaluation value calculation unit 702 determines in step S742 that the DFD calculation range is outside the image frame, the evaluation value calculation unit 702 determines that the motion vector is not an allocation candidate vector to be allocated to the allocation target pixel, and steps S743 to S749. Is skipped, the assigned vector evaluation process is terminated, and the process returns to step S708 in FIG.

評価値演算部702は、ステップS742において、求められたDFD演算範囲が画枠内にあると判断した場合、ステップS743に進み、画枠内にあると判断されたDFD演算範囲を用いて、割付対象画素の評価値DFDを演算し、求められた評価値DFDを、評価値判断部712に出力し、ステップS744に進む。なお、このとき、元フレーム上の位置が画素以下であった場合には、上述した4点補間を用いて、元フレーム上の交点の輝度値を求めることにより、割付対象画素の評価値DFDが演算される。   If the evaluation value calculation unit 702 determines in step S742 that the obtained DFD calculation range is within the image frame, the evaluation value calculation unit 702 proceeds to step S743 and uses the DFD calculation range determined to be within the image frame, The evaluation value DFD of the target pixel is calculated, and the obtained evaluation value DFD is output to the evaluation value determination unit 712, and the process proceeds to step S744. At this time, if the position on the original frame is equal to or less than the pixel, the evaluation value DFD of the allocation target pixel is obtained by obtaining the luminance value of the intersection on the original frame using the above-described four-point interpolation. Calculated.

一方、着目画素差分演算部703は、画素情報演算部701から、元フレーム上の位置の情報が入力されると、ステップS744において、割付対象画素における輝度差分絶対値dpを求め、求められた輝度差分絶対値dpを、画素差分判断部711に出力し、ステップS745に進む。なお、このときも、元フレーム上の位置が画素以下であった場合には、着目画素差分演算部703は、上述した4点補間を用いて、元フレーム上の交点の輝度値を求めることにより、割付対象画素における輝度差分絶対値dpを演算する。   On the other hand, when the position information on the original frame is input from the pixel information calculation unit 701, the target pixel difference calculation unit 703 obtains the luminance difference absolute value dp in the allocation target pixel in step S744, and the obtained luminance The difference absolute value dp is output to the pixel difference determining unit 711, and the process proceeds to step S745. At this time, if the position on the original frame is equal to or less than the pixel, the pixel-of-interest calculation unit 703 obtains the luminance value of the intersection on the original frame using the above-described four-point interpolation. The luminance difference absolute value dp in the allocation target pixel is calculated.

画素差分判断部711は、ステップS745において、着目画素差分演算部703からの割付対象画素の輝度差分絶対値dpが、所定のしきい値以下であるか否かを判断し、割付対象画素の輝度差分絶対値dpが、所定のしきい値より大きいと判断した場合、フレームtおよびフレームt+1の交点がそれぞれ異なるオブジェクトに属する可能性が高いと判断し、すなわち、その動きベクトルは、割付対象画素における信頼度が低く、割付対象画素に割り付ける割付候補ベクトルにはならないと判断し、ステップS746乃至S749の処理をスキップし、割付ベクトル評価処理を終了し、図44のステップS708に戻る。   In step S745, the pixel difference determination unit 711 determines whether the luminance difference absolute value dp of the allocation target pixel from the target pixel difference calculation unit 703 is equal to or less than a predetermined threshold value, and determines the luminance of the allocation target pixel. When it is determined that the difference absolute value dp is larger than the predetermined threshold value, it is determined that there is a high possibility that the intersections of the frame t and the frame t + 1 belong to different objects, that is, the motion vector is determined in the allocation target pixel. It is determined that the reliability is low and the assignment candidate vector to be assigned to the assignment target pixel is not determined, the processes of steps S746 to S749 are skipped, the assignment vector evaluation process is terminated, and the process returns to step S708 of FIG.

画素差分判断部711は、ステップS745において、割付対象画素の輝度差分絶対値dpが、所定のしきい値以下であると判断した場合、ステップS746に進む。評価値判断部712は、ステップS746において、ベクトル選択部705のDFDテーブルを参照し、評価値演算部702からの割付対象画素の評価値DFDが、DFDテーブルに記憶されている割付対象画素の最小評価値(いまの場合、0ベクトルの評価値DFD0)よりも小さいか否かを判断し、評価値演算部702からの割付対象画素の評価値DFDが、DFDテーブルに記憶されている割付対象画素の最小評価値以上であると判断した場合、その動きベクトルは、割付対象画素において、信頼度が高くないと判断し、ステップS747乃至S749の処理をスキップし、割付ベクトル評価処理を終了し、図44のステップS708に戻る。   If the pixel difference determination unit 711 determines in step S745 that the luminance difference absolute value dp of the allocation target pixel is equal to or less than the predetermined threshold value, the process proceeds to step S746. In step S746, the evaluation value determination unit 712 refers to the DFD table of the vector selection unit 705, and the evaluation value DFD of the allocation target pixel from the evaluation value calculation unit 702 is the minimum allocation target pixel stored in the DFD table. It is determined whether or not the evaluation value (in this case, the evaluation value DFD0 of the zero vector) is smaller, and the evaluation value DFD of the allocation target pixel from the evaluation value calculation unit 702 is the allocation target pixel stored in the DFD table. If it is determined that the motion vector is equal to or greater than the minimum evaluation value, it is determined that the reliability of the motion vector is not high in the allocation target pixel, the processing in steps S747 to S749 is skipped, and the allocation vector evaluation processing is terminated. The process returns to step S708 of 44.

一方、評価値判断部712は、ステップS746において、評価値演算部702からの割付対象画素の評価値DFDが、DFDテーブルに記憶されている割付対象画素の最小評価値よりも小さいと判断した場合、その動きベクトルは、割付対象画素において、いままで比較した動きベクトルの中で最も、評価値DFDに基づく信頼度が高いと判断し、信頼度が高いと判断された割付対象画素の評価値DFDを、ベクトル選択部705に出力し、ステップS747に進む。   On the other hand, when the evaluation value determination unit 712 determines in step S746 that the evaluation value DFD of the allocation target pixel from the evaluation value calculation unit 702 is smaller than the minimum evaluation value of the allocation target pixel stored in the DFD table. The motion vector is determined to have the highest reliability based on the evaluation value DFD among the motion vectors compared so far in the allocation target pixel, and the evaluation value DFD of the allocation target pixel determined to have high reliability. Is output to the vector selection unit 705, and the process proceeds to step S747.

ベクトル選択部705は、評価値判断部712からの割付対象画素の評価値DFDを入力すると、ステップS747において、割付フラグメモリ56の割付対象画素の割付フラグを1(True)に書き換え、ステップS748に進み、DFDテーブルの割付対象画素が対応する最小評価値を、評価値判断部712により信頼度が高いと判断された評価値DFDに書き換え、ステップS749に進む。   Upon receiving the evaluation value DFD of the allocation target pixel from the evaluation value determination unit 712, the vector selection unit 705 rewrites the allocation flag of the allocation target pixel in the allocation flag memory 56 to 1 (True) in step S747, and in step S748. The minimum evaluation value corresponding to the pixel to be allocated in the DFD table is rewritten to the evaluation value DFD determined to have high reliability by the evaluation value determination unit 712, and the process proceeds to step S749.

ベクトル選択部705には、ステップS706において、画素情報演算部701から選択した割付対象画素とその動きベクトルが入力されている。したがって、ベクトル選択部705は、ステップS749において、割付ベクトルメモリ55の割付対象画素に割り付けられている動きベクトルを、信頼度が高いと判断された評価値DFDに対応する動きベクトルで書き換え、割付ベクトル評価処理を終了し、図44のステップS708に戻る。   The vector selection unit 705 receives the allocation target pixel selected from the pixel information calculation unit 701 and its motion vector in step S706. Therefore, in step S749, the vector selection unit 705 rewrites the motion vector allocated to the allocation target pixel in the allocation vector memory 55 with the motion vector corresponding to the evaluation value DFD determined to have high reliability, and allocates the allocation vector. The evaluation process ends, and the process returns to step S708 in FIG.

以上のように、内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶときに、評価値DFDだけでなく、割付対象画素を基準に動きベクトルで対応付けた元フレーム上の位置に基づいて求められる、割付対象画素の輝度差分絶対値を別扱いにし、評価するようにしたので、従来の評価値DFDを用いるだけの場合よりも、割付候補ベクトルの中から、最も確からしい動きベクトルを選んで、割付対象画素に割り付けることができる。これにより、ベクトル割付の精度が向上し、後段の画像補間処理において生成される画像の不連続性などを抑制することができ、画像の品質を向上させることができる。   As described above, when selecting a motion vector to be allocated to the allocation target pixel of the interpolation frame, not only the evaluation value DFD but also a position on the original frame associated with the motion vector based on the allocation target pixel is obtained. Since the absolute value of the luminance difference of the allocation target pixel is treated separately and evaluated, the most probable motion vector is selected from the allocation candidate vectors rather than using the conventional evaluation value DFD. , It can be assigned to the pixel to be assigned. Thereby, the accuracy of vector allocation is improved, discontinuity of the image generated in the subsequent image interpolation processing, etc. can be suppressed, and the image quality can be improved.

さらに、評価値DFDや輝度差分絶対値を求める際などに、画素以下位置の画素値が必要な場合に、その画素以下位置の近傍4画素との距離を基にした線形補間で値を求めるようにしたので、画素以下位置精度の処理が可能になり、さらに、従来の画素以下成分を丸めてしまう方法よりも、輝度差分絶対値dpや評価値DFDを精度よく求めることができ、これにより、割付候補ベクトルの中から、着目画素により確からしい動きベクトルを割り付けることができる。すなわち、ベクトル割付処理の精度が向上する。   Furthermore, when obtaining the evaluation value DFD and the luminance difference absolute value, etc., when a pixel value at a position below the pixel is necessary, the value is obtained by linear interpolation based on the distance to the four neighboring pixels at the position below the pixel. As a result, it is possible to perform processing with sub-pixel position accuracy, and more accurately obtain the luminance difference absolute value dp and the evaluation value DFD than the conventional method of rounding off the sub-pixel components. From the allocation candidate vectors, it is possible to allocate a more probable motion vector by the pixel of interest. That is, the accuracy of vector allocation processing is improved.

また、0ベクトルによる評価値DFDを初期値として、DFDテーブルに予め保持しておき、動きベクトルを順次処理している間に、ある動きベクトルによる評価値DFDがその時点で最小評価値となった場合に、DFDテーブルの最小評価値と、割付ベクトルメモリ55に割り付けられている動きベクトルを、随時更新するようにしたので、時間とリソースを効率的に使用することができる。   In addition, the evaluation value DFD based on the 0 vector is stored as an initial value in the DFD table in advance, and while the motion vector is sequentially processed, the evaluation value DFD based on a certain motion vector becomes the minimum evaluation value at that time. In this case, since the minimum evaluation value of the DFD table and the motion vector allocated to the allocation vector memory 55 are updated as needed, time and resources can be used efficiently.

次に、ここで、内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶときの割付ベクトル評価処理における評価値DFDについて考えてみる。図25を参照して上述したベクトル検出においては、原理的に評価値DFDが最小となるものを求める。したがって、動きベクトルの検出に評価値DFDを用いることは、時刻tのフレームtのある画素に対して(すなわち、視点が1つに対して)、時刻t+1のフレームt+1が最小となる位置(画素)を求めることになるので、評価値DFDを評価値として用いることは、ベクトル検出にとても効果的である。   Next, consider the evaluation value DFD in the allocation vector evaluation process when selecting a motion vector to be allocated to the allocation target pixel of the interpolation frame. In the vector detection described above with reference to FIG. 25, the one having the smallest evaluation value DFD is obtained in principle. Therefore, using the evaluation value DFD for motion vector detection means that the position at which the frame t + 1 at the time t + 1 is the smallest (pixel) with respect to a certain pixel in the frame t at the time t (that is, for one viewpoint). Therefore, using the evaluation value DFD as the evaluation value is very effective for vector detection.

一方、割付ベクトル評価処理においても、上述したように1つの評価値として評価値DFDを用いるが、割付対象画素に割り付けられる候補となる、複数の割付候補ベクトルは、フレームtおよびフレームt+1においてそれぞれ異なる位置を通過する場合がある。   On the other hand, in the allocation vector evaluation process, the evaluation value DFD is used as one evaluation value as described above, but a plurality of allocation candidate vectors that are candidates to be allocated to the allocation target pixel are different in the frame t and the frame t + 1, respectively. May pass position.

すなわち、上述した図40を参照して具体的に説明すると、内挿フレームF2上の左から3番目の画素(割付対象画素)の割付候補ベクトルは、動きベクトルv1およびv2であるが、動きベクトルv1のフレームt上の画素(左から1番目)と、動きベクトルv2のフレームt上の画素(左から3番目)は異なる画素であり、さらに、動きベクトルv1とフレームt+1とが交差する点(フレームt+1の左から4,5番目の画素近傍の点)と、動きベクトルv2とフレームt+1とが交差する点(フレームt+1の左から2,3番目の画素近傍の点)は異なる点である。   Specifically, with reference to FIG. 40 described above, the allocation candidate vectors of the third pixel from the left (allocation target pixel) on the interpolation frame F2 are the motion vectors v1 and v2. The pixel on the frame t of the v1 (first from the left) and the pixel on the frame t of the motion vector v2 (third from the left) are different pixels, and further, the point where the motion vector v1 and the frame t + 1 intersect ( A point near the fourth and fifth pixels from the left of the frame t + 1) and a point where the motion vector v2 and the frame t + 1 intersect (a point near the second and third pixels from the left of the frame t + 1) are different points.

したがって、動きベクトルv1と動きベクトルv2のどちらかを割付対象画素の割付ベクトルとして選択する際に、評価値DFDを用いて比較しようとしても、それぞれ異なる点同士の差分絶対値和である評価値DFDの比較では、視点が異なってしまうため、画像依存性が大きくなる傾向があり、確からしくない動きベクトルを選択してしまう恐れがある。   Therefore, when selecting either the motion vector v1 or the motion vector v2 as the allocation vector of the allocation target pixel, even if an attempt is made to compare using the evaluation value DFD, the evaluation value DFD that is the sum of absolute differences between different points. In this comparison, since the viewpoints are different, the image dependency tends to increase, and there is a possibility of selecting a motion vector that is not certain.

これに対応して、上述したように内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶときに、評価値DFDだけでなく、割付対象画素の輝度差分絶対値を評価するようにした。これにより、評価値DFDを用いるだけの場合よりも、輝度差分絶対値を評価する分、ベクトル割付の精度が向上するようになった。   Correspondingly, when selecting a motion vector to be allocated to the allocation target pixel of the interpolation frame as described above, not only the evaluation value DFD but also the luminance difference absolute value of the allocation target pixel is evaluated. As a result, the accuracy of vector allocation is improved by evaluating the luminance difference absolute value, compared to the case of using only the evaluation value DFD.

しかしながら、評価値DFDを求めるだけの場合でも、m×nブロックの画素を計算しなければならないため、処理時間がかかり、ハードウェアの規模がある程度必要であるにもかかわらず、それに加えて、輝度差分絶対値も評価した場合には、さらに、処理ステップ数が多くなってしまい、処理時間がかかり、回路規模も大きくなってしまう問題がある。   However, even when only the evaluation value DFD is obtained, since pixels of m × n blocks have to be calculated, processing time is required and the hardware scale is required to some extent. When the absolute difference value is also evaluated, there are further problems that the number of processing steps increases, processing time increases, and the circuit scale increases.

また、それだけでなく、評価値DFDや輝度差分絶対値を求める際に、画素以下位置の画素値が必要な場合には、その画素以下位置の近傍4画素との距離を基にした線形補間で値を求めるようにしたので、ベクトル割付処理の精度が向上する反面、さらに、処理時間がかかってしまう問題がある。   In addition to this, when obtaining the evaluation value DFD and the absolute value of the luminance difference, if a pixel value at a position below the pixel is required, linear interpolation based on the distance from the four neighboring pixels at the position below the pixel is used. Since the value is obtained, the accuracy of the vector allocation process is improved, but there is a problem that it takes a longer processing time.

そこで、次に、内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶときに、評価値DFDの以外の評価値を用いて比較する場合を説明する。   Therefore, next, a case will be described in which a comparison is made using an evaluation value other than the evaluation value DFD when selecting a motion vector to be allocated to the allocation target pixel of the interpolation frame.

図47は、ベクトル割付部54の他の構成を示すブロック図である。図47に構成を示すベクトル割付部54は、フレームt上において検出された動きベクトルを、その動きベクトルの周囲の動きベクトルとの差異性(ばらつき)の値(以下、差異性値とも称する)を評価値として用いて信頼度を評価することにより、割付ベクトルメモリ55上の、補間する60P信号の内挿フレーム上の画素に割り付ける処理を行う。   FIG. 47 is a block diagram showing another configuration of the vector allocating unit 54. 47 assigns a difference (variation) value (hereinafter also referred to as a difference value) between a motion vector detected on the frame t and a motion vector around the motion vector. By using the evaluation value as an evaluation value and evaluating the reliability, a process of assigning to the pixels on the interpolation frame of the 60P signal to be interpolated on the assignment vector memory 55 is performed.

すなわち、図47のベクトル割付部54には、図38のベクトル割付部54と異なり、フレームtおよびt+1の画素値は入力されない。   That is, unlike the vector assignment unit 54 in FIG. 38, pixel values of frames t and t + 1 are not input to the vector assignment unit 54 in FIG.

画素情報演算部751は、検出ベクトルメモリ53のフレームt上の画素を、左上の画素からラスタスキャン順に選択し、選択された画素に検出された動きベクトルを取得し、取得した動きベクトルを、次の時刻のフレームt+1方向に延ばし、延ばした動きベクトルと、内挿フレームとの交点を算出する。そして、画素情報演算部751は、算出された動きベクトルと内挿フレームとの交点から、内挿フレーム上において、その動きベクトルの割付対象画素を設定し、動きベクトルおよび割付対象画素の位置の情報を、ベクトル選択部754に出力する。   The pixel information calculation unit 751 selects a pixel on the frame t in the detection vector memory 53 in the raster scan order from the upper left pixel, acquires a motion vector detected by the selected pixel, And the intersection of the extended motion vector and the interpolated frame is calculated. Then, the pixel information calculation unit 751 sets an allocation target pixel of the motion vector on the interpolation frame from the intersection of the calculated motion vector and the interpolation frame, and information on the position of the motion vector and the allocation target pixel Is output to the vector selection unit 754.

画素情報演算部751が動きベクトルを取得したとき、評価値演算部752には、画素情報演算部751により選択された画素の動きベクトルと、その動きベクトルの画素の周囲の画素(例えば、周囲8画素)に検出された動きベクトルが入力される。評価値演算部752は、画素情報演算部751により選択された画素の動きベクトルと、その動きベクトルの画素の周囲の画素(例えば、周囲8画素)に検出された動きベクトルを用いて、動きベクトルの差異性値を演算して求め、求めた動きベクトルの差異性値を、ベクトル評価部753に出力する。   When the pixel information calculation unit 751 acquires the motion vector, the evaluation value calculation unit 752 receives the motion vector of the pixel selected by the pixel information calculation unit 751 and pixels around the pixel of the motion vector (for example, the surrounding 8 The detected motion vector is input to (pixel). The evaluation value calculation unit 752 uses the motion vector of the pixel selected by the pixel information calculation unit 751 and the motion vector detected for pixels around the pixel of the motion vector (for example, surrounding 8 pixels), And the difference value of the obtained motion vector is output to the vector evaluation unit 753.

ベクトル評価部753は、評価値演算部752から入力された動きベクトルの差異性値が、ベクトル選択部754からの割付対象画素の最小評価値より小さいか否かを判断し、動きベクトルの差異性値が、割付対象画素の最小評価値よりも小さいと判断した場合、その動きベクトルの信頼度が高いと判断し、ベクトル選択部754に、その動きベクトルの差異性値を出力する。   The vector evaluation unit 753 determines whether or not the difference value of the motion vector input from the evaluation value calculation unit 752 is smaller than the minimum evaluation value of the allocation target pixel from the vector selection unit 754, and the difference of the motion vector is determined. If it is determined that the value is smaller than the minimum evaluation value of the allocation target pixel, it is determined that the reliability of the motion vector is high, and the difference value of the motion vector is output to the vector selection unit 754.

ベクトル選択部754は、内挿フレーム上の各画素における最小評価値を保持する評価値メモリ(図示しない)を有している。なお、この評価値メモリは、図38のベクトル選択部705が有するDFDテーブルと同様の構成を有するものである。ベクトル選択部754は、動きベクトルが割り付けられる割付対象画素に対応する、割付フラグメモリ56のフラグを1(true)に書き換えたり、画素情報演算部751からの割付対象画素の位置の情報に基づいて、割付対象画素の評価値メモリの最小評価値を、その動きベクトルの差異性値に書き換える。また、ベクトル選択部754は、ベクトル評価部753の制御のもと、画素情報演算部751からの割付対象画素の位置の情報に基づいて、割付ベクトルメモリ55の割付対象画素に、画素情報演算部751からの動きベクトルを割り付ける。   The vector selection unit 754 has an evaluation value memory (not shown) that holds a minimum evaluation value for each pixel on the interpolation frame. The evaluation value memory has the same configuration as the DFD table included in the vector selection unit 705 in FIG. The vector selection unit 754 rewrites the flag of the allocation flag memory 56 corresponding to the allocation target pixel to which the motion vector is allocated to 1 (true) or based on the position information of the allocation target pixel from the pixel information calculation unit 751. The minimum evaluation value in the evaluation value memory of the allocation target pixel is rewritten with the difference value of the motion vector. In addition, the vector selection unit 754 controls the pixel evaluation unit 753 to assign the pixel information calculation unit to the allocation target pixel of the allocation vector memory 55 based on the position information of the allocation target pixel from the pixel information calculation unit 751. The motion vector from 751 is allocated.

次に、図48を参照して、図47のベクトル割付部54における動きベクトルの評価について説明する。図48は、下から、時刻tのフレームt、時刻tと時刻t+1の間の時刻の内挿フレームF1、および、時刻t+1のフレームt+1を、1次元的に示している。また、各フレーム上の丸は、フレーム上の画素を示している。   Next, with reference to FIG. 48, the motion vector evaluation in the vector allocation unit 54 in FIG. 47 will be described. FIG. 48 one-dimensionally shows a frame t at time t, an interpolation frame F1 at a time between time t and time t + 1, and a frame t + 1 at time t + 1 from the bottom. A circle on each frame indicates a pixel on the frame.

図48の例においては、前段のベクトル検出部52によりフレームtにおいて検出された動きベクトルv1およびv2は、フレームt+1方向に延ばされている。   In the example of FIG. 48, the motion vectors v1 and v2 detected in the frame t by the preceding vector detection unit 52 are extended in the frame t + 1 direction.

フレームtの左側の画素から、フレームt+1の左から3番目の画素近傍への動きベクトルv1は、内挿フレームF1上の左から2番目の画素Gの近傍を通っており、フレームtの左から3番目の画素から、フレームt+1の左から2番目の画素Gの近傍への動きベクトルv1は、内挿フレームF1上の左から2番目の画素の近傍を通っている。すなわち、動きベクトルv1およびv2は、それぞれ内挿フレームF1の画素Gの近傍を通るので内挿フレームF1の画素Gの割付候補ベクトルとされる。   The motion vector v1 from the left pixel of the frame t to the vicinity of the third pixel from the left of the frame t + 1 passes through the vicinity of the second pixel G from the left on the interpolation frame F1, and from the left of the frame t The motion vector v1 from the third pixel to the vicinity of the second pixel G from the left in the frame t + 1 passes through the vicinity of the second pixel from the left on the interpolation frame F1. That is, since the motion vectors v1 and v2 pass through the vicinity of the pixel G of the interpolation frame F1, each of the motion vectors v1 and v2 is set as an allocation candidate vector of the pixel G of the interpolation frame F1.

ベクトル割付部54は、割付候補ベクトルである、動きベクトルv1と動きベクトルv2を比較するために、フレームt上における各動きベクトルの差異性値(ばらつき)を次の式(16)で求め、これを評価値として用いる。   In order to compare the motion vector v1 and the motion vector v2 which are the allocation candidate vectors, the vector allocation unit 54 obtains a difference value (variation) of each motion vector on the frame t by the following equation (16). Is used as an evaluation value.

動きベクトルの差異性値 = Σ|vi−v| ・・・(16) Motion vector difference value = Σ | v i −v | (16)

ここで、vは、対象となる動きベクトルであり、viは、フレームt上における動きベクトルvが検出された画素の、周囲の画素(例えば、周囲8画素)で検出された動きベクトル(すなわち、周囲ベクトル)である。なお、式(16)においては、絶対値の代わりに、自乗した値を用いるようにしてもよい。 Here, v is a target motion vector, and v i is a motion vector (that is, surrounding 8 pixels) detected from the pixels where the motion vector v is detected on the frame t (ie, the surrounding 8 pixels). , Ambient vector). In equation (16), a square value may be used instead of the absolute value.

ベクトル割付部54は、式(16)を用いて、動きベクトルv1とv2の差異性値をそれぞれ求め、求めた差異性を比較した結果、周囲ベクトルとの差異性が小さい、すなわち、動きベクトルが、その周囲ベクトルとの差異性が小さい動きベクトルの方が、フレームt上において安定して検出されている動きベクトルであると判定し、周囲ベクトルとの差異性が小さい動きベクトルを画素Gに割り付ける。   The vector allocating unit 54 obtains the difference values between the motion vectors v1 and v2 by using the equation (16), and as a result of comparing the obtained differences, the difference from the surrounding vectors is small. A motion vector having a smaller difference from the surrounding vector is determined to be a motion vector that is stably detected on the frame t, and a motion vector having a smaller difference from the surrounding vector is allocated to the pixel G. .

以上のように、動きベクトルの差異性により動きベクトルを評価することにより、ベクトル割付においては、画像依存性が低く、評価値DFDの場合よりも、確からしくない動きベクトルを選択してしまうことが抑制される。これにより、例えば、図49に示されるようなベクトル割付の際に生じる恐れのある「貫き」といった問題を抑制することができる。   As described above, by evaluating motion vectors based on the difference of motion vectors, image allocation is low in vector assignment, and a motion vector that is less accurate than the case of the evaluation value DFD may be selected. It is suppressed. Thereby, for example, problems such as “penetration” that may occur at the time of vector assignment as shown in FIG. 49 can be suppressed.

図49の例において、物体Obの画像オブジェクトは、時刻t乃至時刻t+1(すなわち、フレームt乃至フレームt+1)を、動きベクトルv1で、図中左側から右側へ通過している。一方、背景は、時刻t乃至時刻t+1を、動きベクトルv2で、図中右側から左側へ通過している。   In the example of FIG. 49, the image object of the object Ob passes the time t to the time t + 1 (that is, the frame t to the frame t + 1) with the motion vector v1 from the left side to the right side in the drawing. On the other hand, the background passes from time t to time t + 1 with the motion vector v2 from the right side to the left side in the figure.

したがって、本来ならば、内挿フレームF1において物体Obの画像オブジェクトが通過する位置にある画素Gには、動きベクトルv1が割り付けベクトルとして選択されるべきであるが、例えば、物体Obの画像オブジェクトよりも大きいサイズである、m×nのブロックBの画素を用いて、評価値DFDを求め、その評価値DFDにより、動きベクトルv1とv2を評価してしまうと、背景は、平坦なことが多く、もともと背景の評価値DFDが小さくなる傾向があることから、誤って、背景の動きベクトルv2が選ばれてしまう恐れがある。これにより生成される内挿フレームF1の物体Obの画像オブジェクトには、背景が貫いてしまう結果となってしまう。   Therefore, originally, the motion vector v1 should be selected as the allocation vector for the pixel G at the position where the image object of the object Ob passes in the interpolation frame F1, but for example, from the image object of the object Ob If the evaluation value DFD is obtained using pixels of the block B of m × n, which is a large size, and the motion vectors v1 and v2 are evaluated by the evaluation value DFD, the background is often flat. Since the background evaluation value DFD tends to be small, the background motion vector v2 may be erroneously selected. As a result, the background of the image object of the object Ob of the interpolated frame F1 generated thereby results.

しかしながら、背景は、平坦であった場合、平坦であるがゆえ、動きベクトル検出処理においては、ディテールを有する物体よりも、誤った動きベクトルが検出されている場合が多い。このような場合には、動きベクトルv2と、その周囲ベクトルとの差異性は、大きな値となってしまう。一方、ディテールを有する物体は、ディテールを有するがゆえ、平坦な背景よりも、より確からしい動きベクトルが検出されている可能性が高い。したがって、この場合には、動きベクトルv1と、その周囲ベクトルとの差異性は、動きベクトルv2と、その周囲ベクトルとの差異性よりも小さな値となる。   However, if the background is flat, the motion vector detection process often detects an erroneous motion vector rather than an object having details. In such a case, the difference between the motion vector v2 and the surrounding vector becomes a large value. On the other hand, since an object having details has details, there is a high possibility that a more reliable motion vector is detected than a flat background. Therefore, in this case, the difference between the motion vector v1 and its surrounding vector is smaller than the difference between the motion vector v2 and its surrounding vector.

以上のことから、動きベクトルとその周囲ベクトルとの差異性を評価値として用いることにより、内挿フレームF1の画素Gにおいては、物体Obのオブジェクトに背景が貫いてしまう「貫き」が抑制され、より確からしい動きベクトルが割付ベクトルとして割り付けられる。   From the above, by using the difference between the motion vector and its surrounding vector as an evaluation value, “piercing” in which the background penetrates the object Ob of the object Ob is suppressed in the pixel G of the interpolation frame F1, More probable motion vectors are allocated as allocation vectors.

次に、図50のフローチャートを参照して、図47のベクトル割付部54のベクトル割付処理の詳細を説明する。すなわち、このベクトル割付処理は、図44のベクトル割付処理の他の例である。   Next, the details of the vector allocation processing of the vector allocation unit 54 of FIG. 47 will be described with reference to the flowchart of FIG. That is, this vector allocation process is another example of the vector allocation process of FIG.

検出ベクトルメモリ53に、前段のベクトル検出部52により、フレームtにおいて検出された動きベクトルが記憶されると、画素情報演算部751は、ベクトル選択部754を制御し、ステップS761において、割付フラグメモリ56の割付フラグを0(False)で初期化させ、ステップS762に進む。   When the motion vector detected in the frame t is stored in the detection vector memory 53 by the preceding vector detection unit 52, the pixel information calculation unit 751 controls the vector selection unit 754, and in step S761, the allocation flag memory The allocation flag of 56 is initialized with 0 (False), and the process proceeds to step S762.

画素情報演算部751は、ステップS762において、検出ベクトルメモリ53上の元フレームから画素を選択し、ステップS763に進む。なお、この場合、フレームの左上からラスタスキャン順に画素が選択される。   In step S762, the pixel information calculation unit 751 selects a pixel from the original frame on the detection vector memory 53, and proceeds to step S763. In this case, pixels are selected in the raster scan order from the upper left of the frame.

画素情報演算部751は、ステップS763において、画素位置演算処理を実行する。この画素位置演算処理の詳細を、図51のフローチャートを参照して説明する。なお、図51の画素位置演算処理は、図45の画素位置演算処理のうち、ステップS724の元フレーム上の位置の算出処理を除いた点が異なるだけであり、その他の処理は、図45の画素位置演算処理と基本的に同様の処理を行う。   In step S763, the pixel information calculation unit 751 executes pixel position calculation processing. Details of the pixel position calculation processing will be described with reference to the flowchart of FIG. The pixel position calculation process in FIG. 51 is different from the pixel position calculation process in FIG. 45 except for the position calculation process in the original frame in step S724. The other processes are the same as those in FIG. A process basically similar to the pixel position calculation process is performed.

図51のステップS771において、画素情報演算部751は、図50のステップS762の処理により選択された画素で検出された動きベクトルを、検出メモリベクトル53から取得し、ステップS772に進む。なお、このとき、画素情報演算部751により選択された画素の動きベクトルと、その動きベクトルの画素の周囲の画素(例えば、周囲8画素)に検出された動きベクトルは、評価値演算部752に入力される。   In step S771 in FIG. 51, the pixel information calculation unit 751 acquires the motion vector detected in the pixel selected by the process in step S762 in FIG. 50 from the detection memory vector 53, and proceeds to step S772. At this time, the motion vector of the pixel selected by the pixel information calculation unit 751 and the motion vector detected in pixels around the pixel of the motion vector (for example, the surrounding eight pixels) are sent to the evaluation value calculation unit 752. Entered.

画素情報演算部751は、ステップS772において、取得された動きベクトルと内挿フレームの交点を算出する。すなわち、画素情報演算部751は、取得した動きベクトルを、次フレームt+1方向に延ばし、延ばした動きベクトルと、内挿フレームとの交点を算出し、ステップS773に進む。   In step S772, the pixel information calculation unit 751 calculates the intersection of the acquired motion vector and the interpolation frame. That is, the pixel information calculation unit 751 extends the acquired motion vector in the direction of the next frame t + 1, calculates the intersection of the extended motion vector and the interpolated frame, and proceeds to step S773.

画素情報演算部751は、ステップS773において、動きベクトルと内挿フレームから算出された交点から、割付対象画素を設定する。このとき、画素情報演算部751は、交点が内挿フレーム上の画素位置に一致する場合には、交点を、割付対象画素に設定する。一方、画素情報演算部751は、交点が内挿フレーム上の画素位置に一致しない場合には、上述したように、内挿フレーム上の交点の近傍4画素を、割付対象画素に設定する。そして、画素情報演算部751は、画素位置演算処理を終了し、図50のステップS764に戻る。   In step S <b> 773, the pixel information calculation unit 751 sets an allocation target pixel from the intersection calculated from the motion vector and the interpolation frame. At this time, when the intersection point coincides with the pixel position on the interpolation frame, the pixel information calculation unit 751 sets the intersection point as the allocation target pixel. On the other hand, when the intersection does not coincide with the pixel position on the interpolation frame, the pixel information calculation unit 751 sets the four neighboring pixels on the interpolation frame as the allocation target pixels as described above. Then, the pixel information calculation unit 751 ends the pixel position calculation process, and returns to step S764 in FIG.

画素情報演算部751は、ステップS764において、割付ベクトル評価処理を実行し、ステップS765に進む。この割付ベクトル評価処理の詳細は、図52を参照して後述するが、この割付ベクトル評価処理により、動きベクトルの差異性値が求められ、求められた動きベクトルの差異性値に基づいて、割付対象画素における動きベクトルの信頼度が判断され、これらの判断の結果、信頼度が高いとされた動きベクトルで、割付ベクトルメモリ55の動きベクトルが書き換えられる。   In step S764, the pixel information calculation unit 751 executes an allocation vector evaluation process, and proceeds to step S765. The details of the allocation vector evaluation process will be described later with reference to FIG. 52. The allocation vector evaluation process obtains a motion vector difference value, and assigns the allocation based on the obtained motion vector difference value. The reliability of the motion vector in the target pixel is determined, and the motion vector in the allocation vector memory 55 is rewritten with the motion vector determined to have high reliability as a result of these determinations.

画素情報演算部751は、ステップS765において、検出ベクトルメモリ53上の元フレームのすべての画素の処理を終了したか否かを判断する。画素情報演算部751は、ステップS765において、検出ベクトルメモリ53上の元フレームのすべての画素の処理を終了していないと判断した場合、ステップS762に戻り、検出ベクトルメモリ53上の元フレームの次の画素を選択し、それ以降の処理を繰り返す。また、画素情報演算部751は、ステップS765において、検出ベクトルメモリ53のすべての画素についての処理を終了したと判断した場合、ベクトル割付処理を終了する。   In step S765, the pixel information calculation unit 751 determines whether or not the processing of all the pixels of the original frame on the detection vector memory 53 has been completed. If the pixel information calculation unit 751 determines in step S765 that the processing of all the pixels of the original frame on the detection vector memory 53 has not been completed, the process returns to step S762 and the next of the original frame on the detection vector memory 53. This pixel is selected, and the subsequent processing is repeated. On the other hand, if the pixel information calculation unit 751 determines in step S765 that the processing for all the pixels in the detection vector memory 53 has been completed, the vector allocation processing ends.

次に、図52のフローチャートを参照して、割付ベクトル評価処理の詳細を説明する。なお、図52は、図50のステップS764の割付ベクトル評価処理の例を示している。   Next, details of the allocation vector evaluation process will be described with reference to the flowchart of FIG. FIG. 52 shows an example of the allocation vector evaluation process in step S764 of FIG.

評価値演算部752は、図52のステップS781において、図50のステップS762において選択された画素の動きベクトルの差異性値を求める。すなわち、図51のステップS771において、画素情報演算部751が動きベクトルを取得したとき、評価値演算部752には、画素情報演算部751により選択された画素の動きベクトルと、その動きベクトルの画素の周囲の画素(例えば、周囲8画素)に検出された動きベクトルが入力される。   In step S781 in FIG. 52, the evaluation value calculation unit 752 obtains a difference value between the motion vectors of the pixels selected in step S762 in FIG. That is, in step S771 of FIG. 51, when the pixel information calculation unit 751 acquires a motion vector, the evaluation value calculation unit 752 includes the motion vector of the pixel selected by the pixel information calculation unit 751 and the pixel of the motion vector. The detected motion vector is input to the surrounding pixels (for example, surrounding 8 pixels).

したがって、評価値演算部752は、図52のステップS781において、画素情報演算部751により選択された画素の動きベクトルと、その動きベクトルの画素の周囲の画素(例えば、周囲8画素)に検出された動きベクトルを用いて、式(16)に示される動きベクトルの差異性値を演算して求め、求めた動きベクトルの差異性値を、ベクトル評価部753に出力し、ステップS782に進む。   Therefore, the evaluation value calculation unit 752 detects the motion vector of the pixel selected by the pixel information calculation unit 751 and the pixels around the pixel of the motion vector (for example, the surrounding 8 pixels) in step S781 of FIG. The motion vector difference value shown in Expression (16) is calculated using the obtained motion vector, and the obtained motion vector difference value is output to the vector evaluation unit 753, and the process proceeds to step S782.

ステップS782において、画素情報演算部751は、図51のステップS773において算出された割付対象画素を選択し、選択した割付対象画素と、その動きベクトルを、ベクトル選択部754に出力し、ステップS783に進む。なお、ステップS782において、画素情報演算部751は、割付対象画素が複数存在する場合には、左上の画素から選択する。   In step S782, the pixel information calculation unit 751 selects the allocation target pixel calculated in step S773 of FIG. 51, and outputs the selected allocation target pixel and its motion vector to the vector selection unit 754, and then proceeds to step S783. move on. In step S782, the pixel information calculation unit 751 selects from the upper left pixels when there are a plurality of allocation target pixels.

ベクトル選択部754は、ステップS783において、画素情報演算部751からの割付対象画素に対応する割付フラグメモリ56のフラグが1(true)であるか否かを判定し、割付フラグメモリ56のフラグが1(true)ではないと判定した場合、ステップS784に進み、割付対象画素に対応する割付フラグメモリ56のフラグを1(true)に書き換えて、ステップS786に進む。   In step S783, the vector selection unit 754 determines whether or not the flag of the allocation flag memory 56 corresponding to the allocation target pixel from the pixel information calculation unit 751 is 1 (true), and the flag of the allocation flag memory 56 is set. If it is determined that it is not 1 (true), the process proceeds to step S784, the flag of the allocation flag memory 56 corresponding to the allocation target pixel is rewritten to 1 (true), and the process proceeds to step S786.

すなわち、割付フラグメモリ56のフラグが0(False)の場合、その割付対象画素の割付ベクトルメモリ55には、割付ベクトルがまだ割り付いておらず、ベクトル選択部754に内蔵される評価値メモリにも最小評価値が記憶されていない。したがって、ベクトル選択部754は、割付フラグメモリ56のフラグが0(False)の場合、割付フラグメモリ56のフラグを1(true)に書き換えて、最小評価値と比較することなく(すなわち、ステップS785の処理を実行することなく)、ステップS786の処理に進む。なお、評価値メモリには、初期値として、そのメモリに記憶される最大値を記憶しておくようにしてもよい。   That is, when the flag of the allocation flag memory 56 is 0 (False), the allocation vector memory 55 of the allocation target pixel has not yet been allocated, and the evaluation value memory built in the vector selection unit 754 No minimum evaluation value is stored. Therefore, when the flag of the allocation flag memory 56 is 0 (False), the vector selection unit 754 rewrites the flag of the allocation flag memory 56 to 1 (true) and does not compare with the minimum evaluation value (that is, step S785). Without executing the process of step S786). The evaluation value memory may store the maximum value stored in the memory as an initial value.

一方、ステップS783において、割付フラグメモリ56のフラグが1(true)であると判定された場合、すでに、その割付対象画素の割付ベクトルメモリ55には、他の割付ベクトルがまだ割り付いており、評価値メモリに、対応する最小評価値が記憶されている。   On the other hand, if it is determined in step S783 that the flag of the allocation flag memory 56 is 1 (true), the allocation vector memory 55 of the allocation target pixel has already been allocated with other allocation vectors. A corresponding minimum evaluation value is stored in the evaluation value memory.

したがって、ステップS783において、割付フラグメモリ56のフラグが1(true)であると判定された場合、ベクトル選択部754は、評価値メモリより、割付対象画素に対応する最小評価値を読み出し、ベクトル評価部753に供給し、ステップS785に進む。   Therefore, when it is determined in step S783 that the flag of the allocation flag memory 56 is 1 (true), the vector selection unit 754 reads the minimum evaluation value corresponding to the allocation target pixel from the evaluation value memory, and performs vector evaluation. The process proceeds to step S785.

ベクトル評価部753は、ベクトル選択部754から最小評価値が供給されると、ステップS781において求めた動きベクトルの差異性値が、ベクトル選択部754からの割付対象画素の最小評価値よりも小さいか否かを判定し、動きベクトルの差異性値が、割付対象画素の最小評価値よりも小さいと判定した場合、その動きベクトルの信頼度が高いと判定し、動きベクトルの差異性値を、ベクトル選択部754に供給し、ステップS786に進む。   When the minimum evaluation value is supplied from the vector selection unit 754, the vector evaluation unit 753 determines whether the difference value of the motion vector obtained in step S781 is smaller than the minimum evaluation value of the allocation target pixel from the vector selection unit 754. If the difference value of the motion vector is determined to be smaller than the minimum evaluation value of the allocation target pixel, it is determined that the reliability of the motion vector is high, and the difference value of the motion vector is The data is supplied to the selection unit 754, and the process proceeds to step S786.

ベクトル選択部754は、ステップS786において、評価値メモリの対応する最小評価値を、ベクトル評価部753からの動きベクトルの差異性値に書き換え、ステップS787に進み、割付ベクトルメモリ55の割付対象画素に割り付けられている動きベクトルを、信頼度が高いと判断された評価値に対応する動きベクトルで書き換え、ステップS788に進む。   In step S786, the vector selection unit 754 rewrites the corresponding minimum evaluation value in the evaluation value memory with the motion vector difference value from the vector evaluation unit 753, proceeds to step S787, and sets the allocation target pixel in the allocation vector memory 55 as the allocation target pixel. The allocated motion vector is rewritten with a motion vector corresponding to the evaluation value determined to have high reliability, and the process proceeds to step S788.

また、ステップS785において、動きベクトルの差異性値が、評価値メモリの割付対象画素の最小評価値よりも小さくない(評価値メモリの割付対象画素の最小評価値の方が、動きベクトルの差異性値よりも小さい)と判定された場合、その動きベクトルの信頼度は低く、割付ベクトルメモリ55にすでに書き込まれている動きベクトルの信頼度の方が高いとされるので、ステップS786およびS787の処理はスキップされ、処理はステップS788に進む。   In step S785, the difference value of the motion vector is not smaller than the minimum evaluation value of the allocation target pixel in the evaluation value memory (the minimum evaluation value of the allocation target pixel in the evaluation value memory is the difference in motion vector). If it is determined that the motion vector is smaller than the value, the reliability of the motion vector is low, and the reliability of the motion vector already written in the allocation vector memory 55 is higher. Therefore, the processing in steps S786 and S787 is performed. Is skipped, and the process proceeds to step S788.

画素情報演算部751は、ステップS788において、すべての割付対象画素(例えば、4画素)の処理が終了したか否かを判断し、まだ、すべての割付対象画素の処理が終了していないと判断した場合には、ステップS782に戻り、次の割付対象画素を選択し、それ以降の処理を繰り返す。すなわち、割付対象画素が4つある場合であっても、その動きベクトルの差異性値は、一度求められれば、4つの割付対象画素に対してそれを用いることができるので、評価値の比較毎に、ステップS781の演算処理を行う必要がなくなる。   In step S788, the pixel information calculation unit 751 determines whether or not all the allocation target pixels (for example, four pixels) have been processed, and determines that all the allocation target pixels have not yet been processed. If so, the process returns to step S782, the next allocation target pixel is selected, and the subsequent processing is repeated. That is, even when there are four allocation target pixels, once the difference value of the motion vector is obtained, it can be used for the four allocation target pixels. In addition, it is not necessary to perform the calculation process in step S781.

ステップS788において、すべての割付対象画素の処理が終了したと判断された場合、画素情報演算部751は、割付ベクトル評価処理を終了し、図50のステップS765に戻る。   If it is determined in step S788 that the processing of all allocation target pixels has been completed, the pixel information calculation unit 751 ends the allocation vector evaluation processing and returns to step S765 in FIG.

以上のように、内挿フレームの割付対象画素に割り付けられる動きベクトルを選ぶときに、割り付けられる動きベクトルの差異性(ばらつき)を評価値として用いるようにしたので、評価値DFDを用いる場合よりも、特に、図49を参照して上述したような「貫き」などの問題を抑制することができ、割付候補ベクトルの中から、より確からしい動きベクトルを選んで、割付対象画素に割り付けることができる。これにより、ベクトル割付の精度が向上し、後段の画像補間処理において生成される画像の不連続性などを抑制することができ、画像の品質を向上させることができる。   As described above, when selecting a motion vector to be allocated to the allocation target pixel of the interpolation frame, the difference (variation) of the allocated motion vectors is used as the evaluation value. Therefore, compared to the case where the evaluation value DFD is used. In particular, problems such as “penetration” as described above with reference to FIG. 49 can be suppressed, and more probable motion vectors can be selected from the allocation candidate vectors and allocated to the allocation target pixels. . Thereby, the accuracy of vector allocation is improved, discontinuity of the image generated in the subsequent image interpolation processing, etc. can be suppressed, and the image quality can be improved.

また、割り付けられる動きベクトルの差異性(ばらつき)を評価値として用いることにより、図38のベクトル割付部54が実行する割付ベクトル評価に較べて、2枚の元フレームの位置を線形補間で求める(図51のステップS724の処理を実行する)必要がなく、割付対象画素毎に、評価値DFDや輝度差分絶対値dpを求める必要がない。したがって、図44乃至図46の割付ベクトル評価処理と、図50乃至図52の割付ベクトル評価処理を単純に比較しても、図50乃至図52の割付ベクトル評価処理の方がステップ数も少なくなり、処理時間も少なくなる。   Further, by using the difference (variation) of the motion vectors to be allocated as an evaluation value, the positions of two original frames are obtained by linear interpolation as compared with the allocation vector evaluation executed by the vector allocation unit 54 in FIG. It is not necessary to execute the process of step S724 in FIG. 51, and it is not necessary to obtain the evaluation value DFD and the luminance difference absolute value dp for each allocation target pixel. Therefore, even if the allocation vector evaluation process of FIGS. 44 to 46 and the allocation vector evaluation process of FIGS. 50 to 52 are simply compared, the allocation vector evaluation process of FIGS. 50 to 52 requires fewer steps. , Processing time is also reduced.

さらに、画像情報演算部751においては、画像情報演算部701に必要とされる2枚の元フレームの位置の求め直し、線形補間などの演算ブロックが必要なくなり、また、図38のベクトル割付部54の評価値演算部702および着目画素演算部703に必要とされるフレームtおよびt+1の画素値は必要ないので、図47のベクトル割付部54には、その画素値を記憶しておくメモリが必要なくなるので、かなり回路規模を小さくすることができる。   Further, the image information calculation unit 751 eliminates the need to recalculate the positions of the two original frames necessary for the image information calculation unit 701 and linear interpolation, and the vector allocation unit 54 in FIG. 47 does not require the pixel values of the frames t and t + 1 that are required for the evaluation value calculation unit 702 and the pixel-of-interest calculation unit 703, the vector allocation unit 54 in FIG. 47 requires a memory for storing the pixel values. Since this is eliminated, the circuit scale can be considerably reduced.

なお、上記説明においては、検出ベクトルメモリ53の動きベクトルは、勾配法が用いられて検出されているが、ブロックマッチング法など他の方法により求められた動きベクトルが用いられるようにしてもよい。   In the above description, the motion vector of the detection vector memory 53 is detected using the gradient method, but a motion vector obtained by another method such as a block matching method may be used.

次に、割付補償部57の構成の詳細について説明する。   Next, details of the configuration of the allocation compensation unit 57 will be described.

図53は、割付補償部57の構成を示すブロック図である。図53に構成を示す割付補償部57は、割付ベクトル判定部801およびベクトル補償部802により構成され、ベクトル割付部54により動きベクトルが割り付けられなかった60P信号の内挿フレーム上の画素に、その周辺画素の動きベクトルを補って割り付ける処理を行う。   FIG. 53 is a block diagram showing a configuration of the allocation compensator 57. The allocation compensation unit 57 having the configuration shown in FIG. 53 is configured by an allocation vector determination unit 801 and a vector compensation unit 802. Pixels on an interpolation frame of the 60P signal to which no motion vector is allocated by the vector allocation unit 54 A process is performed in which the motion vectors of surrounding pixels are supplemented.

前段のベクトル割付部54により、割付ベクトルメモリ55上の内挿フレームの画素には動きベクトルが割り付けられている。また、ベクトル割付部54により動きベクトルが割り付けられた画素の割付フラグメモリ56の割付フラグには、1(True)が書き込まれており、動きベクトルが割り付けられなかった画素の割付フラグメモリ56の割付フラグには、0(False)が書き込まれている。   The motion vector is assigned to the pixel of the interpolation frame on the assigned vector memory 55 by the preceding vector assigning unit 54. Further, 1 (True) is written in the allocation flag of the pixel allocation flag memory 56 to which the motion vector is allocated by the vector allocation unit 54, and the allocation of the allocation flag memory 56 of the pixel to which no motion vector is allocated. 0 (False) is written in the flag.

割付ベクトル判定部801は、割付フラグメモリ56の割付フラグを参照し、着目画素に、ベクトル割付部54により動きベクトルが割り付けられているか否かを判定する。そして、割付ベクトル判定部801は、ベクトル割付部54により動きベクトルが割り付けられなかった着目画素を選択し、選択した着目画素に対して、ベクトル補償部802を制御し、その着目画素の周辺画素の動きベクトルを選択して、割付ベクトルメモリ55の内挿フレーム上に割り付けさせる。   The allocation vector determination unit 801 refers to the allocation flag in the allocation flag memory 56 and determines whether or not a motion vector is allocated to the pixel of interest by the vector allocation unit 54. Then, the allocation vector determination unit 801 selects a pixel of interest for which no motion vector has been allocated by the vector allocation unit 54, controls the vector compensation unit 802 for the selected pixel of interest, and sets the surrounding pixels of the pixel of interest. A motion vector is selected and allocated on the interpolation frame of the allocation vector memory 55.

ベクトル補償部802は、割付ベクトルメモリ55から、着目画素の周辺画素に割り付けられている動きベクトルを取得し、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、取得した動きベクトルの評価値DFDを求めて比較することにより、着目画素の周辺画素に割り付けられた動きベクトルのうち、評価値DFDに基づく、最も信頼度が高い動きベクトルを、割付ベクトルメモリ55の着目画素に割り付ける。また、ベクトル補償部802は、動きベクトルが割り付けられた着目画素の割付フラグを1(True)に書き換える。   The vector compensation unit 802 acquires the motion vector assigned to the peripheral pixel of the target pixel from the assigned vector memory 55, and uses the frame t of the image at time t and the frame t + 1 of the image at time t + 1 that are input. The obtained motion vector evaluation value DFD is obtained and compared, and the motion vector having the highest reliability based on the evaluation value DFD among the motion vectors assigned to the peripheral pixels of the target pixel is assigned to the assigned vector memory 55. Assigned to the pixel of interest. Further, the vector compensation unit 802 rewrites the allocation flag of the target pixel to which the motion vector is allocated to 1 (True).

図54は、ベクトル補償部802の構成を示すブロック図である。図54に構成を示すベクトル補償部802は、補償処理部811および評価値演算部812により構成される。   FIG. 54 is a block diagram showing the configuration of the vector compensation unit 802. 54 includes a compensation processing unit 811 and an evaluation value calculation unit 812.

補償処理部811は、最小評価値DFDと、最小評価値DFDの動きベクトルを候補ベクトル(以下、補償候補ベクトルとも称する)として記憶するメモリ821を有しており、割付ベクトル判定部801により選択された着目画素の初期値として、0ベクトルの評価値DFDを最小評価値としてメモリ821に記憶し、0ベクトルを、補償候補ベクトルとしてメモリ821に記憶する。補償処理部811は、割付フラグメモリ56を参照して、着目画素の周辺画素の動きベクトルの有無を判断し、割付ベクトルメモリ55から、周辺画素に割り付けられている動きベクトルを取得し、評価値演算部812を制御し、その動きベクトルの評価値DFDを演算させる。   The compensation processing unit 811 includes a memory 821 that stores a minimum evaluation value DFD and a motion vector of the minimum evaluation value DFD as candidate vectors (hereinafter also referred to as compensation candidate vectors), and is selected by the allocation vector determination unit 801. As the initial value of the pixel of interest, the zero vector evaluation value DFD is stored in the memory 821 as the minimum evaluation value, and the zero vector is stored in the memory 821 as the compensation candidate vector. The compensation processing unit 811 refers to the allocation flag memory 56 to determine the presence or absence of motion vectors of the peripheral pixels of the target pixel, acquires the motion vector allocated to the peripheral pixels from the allocation vector memory 55, and evaluates the evaluation value. The calculation unit 812 is controlled to calculate the evaluation value DFD of the motion vector.

また、補償処理部811は、評価値演算部812により演算された評価値DFDがメモリ821に記憶されている最小評価値よりも小さいか否かを判断し、演算された評価値DFDが最小評価値よりも小さいと判断した場合、メモリ821の補償候補ベクトルと最小評価値を、演算された評価値DFDとその動きベクトルに書き換え、最終的に、評価値DFDが最も小さいと判断された周辺画素の動きベクトル(補償候補ベクトル)を、着目画素の動きベクトルとして、割付ベクトルメモリ55の着目画素に割り付ける。さらに、補償処理部811は、動きベクトルが割り付けられた着目画素の割付フラグメモリ56の割付フラグを1(True)に書き換える。   Further, the compensation processing unit 811 determines whether or not the evaluation value DFD calculated by the evaluation value calculation unit 812 is smaller than the minimum evaluation value stored in the memory 821, and the calculated evaluation value DFD is the minimum evaluation. When it is determined that the value is smaller than the value, the compensation candidate vector and the minimum evaluation value in the memory 821 are rewritten to the calculated evaluation value DFD and its motion vector, and finally, the peripheral pixels for which the evaluation value DFD is determined to be the smallest Are assigned to the target pixel in the allocation vector memory 55 as the motion vector of the target pixel. Further, the compensation processing unit 811 rewrites the allocation flag of the allocation flag memory 56 of the target pixel to which the motion vector is allocated to 1 (True).

評価値演算部812は、割付ベクトルメモリ55から周辺画素の動きベクトルを取得すると、入力される時刻tの24P信号の画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、割付ベクトルメモリ55からの動きベクトルの評価値DFDを演算し、演算した評価値DFDを補償処理部811に出力する。   When the evaluation value calculation unit 812 acquires the motion vector of the surrounding pixels from the allocation vector memory 55, the evaluation vector calculation unit 812 uses the frame t of the 24P signal image at time t and the frame t + 1 of the image at time t + 1 to be input. The motion vector evaluation value DFD from 55 is calculated, and the calculated evaluation value DFD is output to the compensation processing unit 811.

図55は、割付補償処理の原理を説明する図である。図55の例においては、内挿フレーム上の各画素が示されている。画素から出力される矢印は、各画素に割り付けられている動きベクトルを表しており、矢印がない画素は、動きベクトルが割り付けられていない画素を表している。   FIG. 55 is a diagram for explaining the principle of allocation compensation processing. In the example of FIG. 55, each pixel on the interpolation frame is shown. An arrow output from a pixel represents a motion vector assigned to each pixel, and a pixel without an arrow represents a pixel to which no motion vector is assigned.

ここで、前段のベクトル割付部54により動きベクトルの割り付けられなかった中央の着目画素Pに対して、着目画素Pの近傍の周辺画素に割り付けられている動きベクトルの中から、評価値DFDに基づく、信頼度が高いものを選択して割り付ける。図55の例の場合、着目画素Pには、着目画素Pの上の画素の動きベクトル(太線矢印)が選択され、割り付けられている。これは、次に説明する動き相関に基づいて実行される処理である。   Here, based on the evaluation value DFD among the motion vectors assigned to the peripheral pixels in the vicinity of the target pixel P with respect to the central target pixel P to which no motion vector is assigned by the vector allocating unit 54 in the previous stage. Select and assign the one with high reliability. In the case of the example in FIG. 55, the motion vector (thick line arrow) of the pixel above the target pixel P is selected and assigned to the target pixel P. This is a process executed based on the motion correlation described below.

図56は、動き相関の原理について説明する図である。図56の例においては、あるフレーム上を動きv1で動くオブジェクトO1と、動きv2で動くオブジェクトO2が示されている。オブジェクトO1に属している着目画素P1とその近傍K1は、オブジェクトO1とほぼ同一動きv1を有している。また、オブジェクトO2に属している着目画素P2とその近傍K2は、オブジェクトO2とほぼ同じ動きv2を有している。   FIG. 56 is a diagram for explaining the principle of motion correlation. In the example of FIG. 56, an object O1 moving with a motion v1 on a certain frame and an object O2 moving with a motion v2 are shown. The target pixel P1 belonging to the object O1 and its vicinity K1 have substantially the same movement v1 as the object O1. Further, the target pixel P2 belonging to the object O2 and its vicinity K2 have substantially the same movement v2 as the object O2.

このように、動き相関とは、ある同じ時間における空間内(同一フレーム内)において、あるオブジェクトに属する画素の動きは、ほぼ同一動きをしていることが多いということを表すものである。したがって、動きベクトルを割り付けることができなかった画素に対しては、ある同じ時間における空間内(同一フレーム内)において、このような動き相関があることを利用して、周辺画素の動きベクトルから、その画素の対応する動きベクトルを選択することができる。なお、説明は省略するが、時間方向の相関も同様である。   As described above, the motion correlation represents that the motion of the pixels belonging to a certain object is often almost the same in a space at the same time (in the same frame). Therefore, for a pixel for which a motion vector could not be assigned, using such a motion correlation in a space at the same time (in the same frame), from the motion vectors of surrounding pixels, The corresponding motion vector for that pixel can be selected. In addition, although description is abbreviate | omitted, the correlation of a time direction is also the same.

次に、図57乃至図63を参照して、動き相関に基づいて実行される動きベクトルの補償処理について説明する。すなわち、周辺画素の動きベクトルから、動きベクトルを選択し、着目画素の動きベクトルとして補う処理である。図57の例においては、白丸は、内挿フレーム上の画素を表しており、動きベクトルを求めようとしている着目画素Pの周辺に、周辺8画素が示されている。この着目画素Pの動きベクトルは、この周辺8画素の動きベクトルを参照して求められる。   Next, with reference to FIG. 57 to FIG. 63, motion vector compensation processing executed based on motion correlation will be described. That is, it is a process of selecting a motion vector from the motion vectors of surrounding pixels and supplementing it as the motion vector of the pixel of interest. In the example of FIG. 57, white circles represent pixels on the interpolation frame, and 8 peripheral pixels are shown around the pixel of interest P for which a motion vector is to be obtained. The motion vector of the pixel of interest P is obtained with reference to the motion vectors of the surrounding 8 pixels.

図58の例においては、着目画素Pの周辺8画素の中で、左上画素、右上画素、および、右下画素(黒丸)に、前段の処理(例えば、上述したベクトル割付処理)などにより求められた動きベクトル(矢印)が示されている。すなわち、この場合の着目画素Pの補償候補ベクトルは、左上画素、右上画素、および、右下画素の動きベクトルとされる。なお、フレーム上において、動きベクトルは、フレーム上の左上の画素からラスタスキャン順に求められていくため、周辺8画素のうち、まだ動きベクトルの求められていない画素も存在する可能性もあるが、まだ動きベクトルは求められていないため、補償候補ベクトルにはできない。   In the example of FIG. 58, the upper left pixel, the upper right pixel, and the lower right pixel (black circle) among the eight pixels around the target pixel P are obtained by the preceding process (for example, the above-described vector allocation process). The motion vector (arrow) is shown. That is, the compensation candidate vectors for the pixel of interest P in this case are the motion vectors of the upper left pixel, the upper right pixel, and the lower right pixel. On the frame, since the motion vector is obtained in the raster scan order from the upper left pixel on the frame, there may be a pixel for which the motion vector is not yet obtained among the surrounding 8 pixels. Since a motion vector has not yet been obtained, it cannot be a compensation candidate vector.

ここで、図59の例に示されるように、周辺8画素の中には、前段の処理において求められた動きベクトルを有する画素(黒丸)の他に、本処理により求められた動きベクトルを有する画素(ハッチングされた丸)も存在する。すなわち、本処理においては、本処理自体の前段の結果も利用される。したがって、図59の例の場合の着目画素Pの補償候補ベクトルは、動きベクトルがすでに存在する画素(黒丸)の動きベクトルと、前段の本処理により求められた動きベクトルを有する画素(ハッチングされた丸)の動きベクトルにより構成されている。   Here, as shown in the example of FIG. 59, the peripheral 8 pixels have the motion vector obtained by this process in addition to the pixel (black circle) having the motion vector obtained in the previous process. There are also pixels (hatched circles). That is, in this process, the result of the previous stage of this process itself is also used. Accordingly, the compensation candidate vector of the pixel of interest P in the example of FIG. 59 is a pixel (hatched) having a motion vector of a pixel in which a motion vector already exists (black circle) and a motion vector obtained by this processing in the previous stage. (Circle) motion vector.

また、図60の例に示されるように、動き量を0とした0ベクトル(静止ベクトル)S0も補償候補ベクトルとして利用することができる。なお、図59の例においては、本処理により求められた動きベクトルを有する画素と、動きベクトルがすでに存在する画素を別々に表したが、どちらも動きベクトルを有するという点で同じであるので、図60乃至図63においては、本処理により求められた動きベクトルを有する画素も、動きベクトルがすでに存在する画素(黒丸)に含まれることとする。したがって、図60の例の場合、着目画素Pの補償候補ベクトルは、動きベクトルがすでに存在する画素(黒丸)の動きベクトルおよび0ベクトルS0により構成されている。   Also, as shown in the example of FIG. 60, a 0 vector (still vector) S0 with a motion amount of 0 can also be used as a compensation candidate vector. In the example of FIG. 59, the pixel having the motion vector obtained by this process and the pixel in which the motion vector already exists are represented separately, but both are the same in that they have a motion vector. In FIG. 60 to FIG. 63, the pixel having the motion vector obtained by this processing is also included in the pixel (black circle) in which the motion vector already exists. Therefore, in the example of FIG. 60, the compensation candidate vector of the target pixel P is configured by a motion vector of a pixel (black circle) in which a motion vector already exists and a zero vector S0.

以上のようにして構成される補償候補ベクトルの信頼度(確からしさ)を比較するために、動きベクトルの評価方法である評価値DFDは、以降の図61乃至図63に示されるようにして求められる。図61は、補償候補ベクトルとして、0ベクトルS0が用いられる例を示している。図62は、補償候補ベクトルとして、周辺8画素の左上画素の動きベクトルVK1が用いられる例を示している。図63は、補償候補ベクトルとして、周辺8画素の上中央画素の動きベクトルVK2が用いられる例を示している。   In order to compare the reliability (probability) of the compensation candidate vectors configured as described above, an evaluation value DFD, which is a motion vector evaluation method, is obtained as shown in FIGS. 61 to 63 below. It is done. FIG. 61 shows an example in which a zero vector S0 is used as a compensation candidate vector. FIG. 62 shows an example in which the motion vector VK1 of the upper left pixels of the surrounding 8 pixels is used as the compensation candidate vector. FIG. 63 shows an example in which the motion vector VK2 of the upper center pixel of the surrounding 8 pixels is used as the compensation candidate vector.

図61の例においては、図中左側に示される着目画素Pの補償候補ベクトルの中から、0ベクトルS0が選択され、選択された0ベクトルS0の評価値DFDを求める例が示されている。すなわち、0ベクトルS0に対する評価値DFDは、着目画素P(60P信号の内挿フレーム)を挟む、24P信号のフレームtとフレームt+1上において、内挿フレーム上の着目画素Pを基準にして、選択された0ベクトルS0が対応付けられる交点を求め、この交点を中心として所定の範囲(m×n)のDFD演算範囲D1−1およびD1−2を算出し、算出されたDFD演算範囲D1−1およびD1−2を用いて、上述した式(1)を演算することにより求められる。   In the example of FIG. 61, an example is shown in which the zero vector S0 is selected from the compensation candidate vectors of the pixel of interest P shown on the left side of the drawing, and the evaluation value DFD of the selected zero vector S0 is obtained. That is, the evaluation value DFD for the 0 vector S0 is selected on the basis of the pixel of interest P on the interpolation frame on the frame t and the frame t + 1 of the 24P signal sandwiching the pixel of interest P (an interpolation frame of the 60P signal). An intersection with which the 0 vector S0 is associated is obtained, DFD calculation ranges D1-1 and D1-2 within a predetermined range (m × n) are calculated around the intersection, and the calculated DFD calculation range D1-1 is calculated. And D1-2 are used to calculate equation (1) described above.

図62の例においては、図中左側に示される着目画素Pの補償候補ベクトルの中から、周辺8画素の左上画素の動きベクトルVK1が選択され、選択された動きベクトルVK1の評価値DFDを求める例が示されている。すなわち、周辺8画素の左上画素の動きベクトルVK1に対する評価値DFDは、着目画素P(内挿フレーム)を挟むフレームtとフレームt+1上において、内挿フレーム上の着目画素Pを基準にして、選択された動きベクトルVK1が対応付けられる交点を求め、この交点を中心として所定の範囲(m×n)のDFD演算範囲D2−1およびD2−2を算出し、算出されたDFD演算範囲D2−1およびD2−2を用いて、上述した式(1)を演算することにより求められる。   In the example of FIG. 62, the motion vector VK1 of the upper left pixel of the surrounding 8 pixels is selected from the compensation candidate vectors of the target pixel P shown on the left side of the drawing, and the evaluation value DFD of the selected motion vector VK1 is obtained. An example is shown. In other words, the evaluation value DFD for the motion vector VK1 of the upper left pixel of the eight neighboring pixels is selected on the basis of the target pixel P on the interpolation frame on the frame t and the frame t + 1 sandwiching the target pixel P (interpolation frame). The intersection with which the motion vector VK1 is associated is obtained, the DFD calculation ranges D2-1 and D2-2 in a predetermined range (m × n) are calculated around the intersection, and the calculated DFD calculation range D2-1 is calculated. And D2-2 are used to calculate the above-described equation (1).

図63の例においては、図中左側に示される着目画素Pの補償候補ベクトルの中から、補償候補ベクトルとして、周辺8画素の上中央画素の動きベクトルVK2が選択され、選択された動きベクトルVK2の評価値DFDを求める例が示されている。すなわち、周辺8画素の上中央画素の動きベクトルVK2に対する評価値DFDは、着目画素P(内挿フレーム)を挟むフレームtとフレームt+1上において、内挿フレーム上の着目画素Pを基準にして、選択された動きベクトルVK2が対応付けられる交点を求め、この交点を中心として所定の範囲(m×n)のDFD演算範囲D3−1およびD3−2を算出し、算出されたDFD演算範囲D3−1およびD3−2を用いて、上述した式(1)を演算することにより求められる。   In the example of FIG. 63, the motion vector VK2 of the upper center pixel of the surrounding eight pixels is selected as the compensation candidate vector from the compensation candidate vectors of the target pixel P shown on the left side of the drawing, and the selected motion vector VK2 is selected. An example is shown in which the evaluation value DFD is obtained. That is, the evaluation value DFD for the motion vector VK2 of the upper central pixel of the surrounding eight pixels is based on the target pixel P on the interpolation frame on the frame t and the frame t + 1 sandwiching the target pixel P (interpolation frame). An intersection point to which the selected motion vector VK2 is associated is obtained, DFD calculation ranges D3-1 and D3-2 in a predetermined range (m × n) are calculated around this intersection point, and the calculated DFD calculation range D3- It is calculated | required by calculating Formula (1) mentioned above using 1 and D3-2.

なお、図中左側に示される他の補償候補ベクトルについても、基本的に同様の処理であるため、その説明は省略するが、以上のようにして、着目画素Pの周辺画素の補償候補ベクトルすべての評価値DFDが求められ、求められたそれらの評価値DFDが比較され、その中で、最も評価値DFDが最小となる補償候補ベクトルが、図64に示されるように、着目画素Pに割り付けられる最も信頼度がある、確からしい動きベクトルとして選択される。   Note that the other compensation candidate vectors shown on the left side in the figure are basically the same processing, and thus the description thereof is omitted. However, as described above, all the compensation candidate vectors for the peripheral pixels of the pixel of interest P are as described above. Evaluation values DFD are obtained, and the obtained evaluation values DFD are compared. Among them, a compensation candidate vector having the smallest evaluation value DFD is assigned to the pixel of interest P as shown in FIG. Selected as the most reliable and probable motion vector.

図64の例の場合、着目画素Pの周辺画素の補償候補ベクトルの中から、周辺8画素の左上画素の動きベクトルVK1の評価値DFDが最も小さいとして判断され、動きベクトルVK1が、着目画素Pの動きベクトルとして選択され、割り付けられている。   In the case of the example in FIG. 64, it is determined that the evaluation value DFD of the motion vector VK1 of the upper left pixel of the eight neighboring pixels is the smallest among the compensation candidate vectors of the peripheral pixels of the target pixel P, and the motion vector VK1 is Is selected and assigned as a motion vector.

以上のように、ベクトル割付部54において割り付けることができなかった画素の動きベクトルを、動き相関を利用して、周辺画素の動きベクトルから補償するようにしたので、動きベクトルが割り付けられず、例えば、0ベクトルが割り付けられていたような場合よりも、動きの乱れを抑制することができる。また、このようにして補償された画素の動きベクトルも、他の画素の補償候補ベクトルとして再度利用することができる。すなわち、空間方向の近傍の動きベクトルだけでなく、時間方向の近傍の動きベクトルも、補償候補ベクトルに用いることができるので、オブジェクト内でほぼ同じ動きをする画素には、ほぼ同一の動きベクトルが選択され、誤りの少ない安定した動きベクトルを得ることができる。これにより、ベクトル割付の精度が向上する。   As described above, since the motion vector of the pixel that could not be allocated by the vector allocation unit 54 is compensated from the motion vector of the surrounding pixels using motion correlation, the motion vector is not allocated. , The disturbance of motion can be suppressed as compared with the case where the 0 vector is assigned. Also, the motion vector of the pixel compensated in this way can be used again as a compensation candidate vector for another pixel. That is, since not only motion vectors in the spatial direction but also motion vectors in the temporal direction can be used as compensation candidate vectors, pixels that perform substantially the same motion in the object have substantially the same motion vector. A stable motion vector that is selected and has few errors can be obtained. This improves the accuracy of vector assignment.

次に、図65のフローチャートを参照して、割付補償処理の詳細を説明する。前段のベクトル割付部54により、割付ベクトルメモリ55上の内挿フレームの画素には動きベクトルが割り付けられている。また、ベクトル割付部54により動きベクトルが割り付けられた画素の割付フラグメモリ56の割付フラグには、1(True)が書き込まれており、動きベクトルが割り付けられなかった画素の割付フラグメモリ56の割付フラグには、0(False)が書き込まれている。   Next, details of the allocation compensation processing will be described with reference to the flowchart of FIG. The motion vector is assigned to the pixel of the interpolation frame on the assigned vector memory 55 by the preceding vector assigning unit 54. Further, 1 (True) is written in the allocation flag of the pixel allocation flag memory 56 to which the motion vector is allocated by the vector allocation unit 54, and the allocation of the allocation flag memory 56 of the pixel to which no motion vector is allocated. 0 (False) is written in the flag.

割付ベクトル判定部801は、ステップS801において、割付フラグメモリ56の内挿フレームの画素を、着目画素として選択し、ステップS802に進む。このとき、割付ベクトル判定部801は、フレームの左上の画素からラスタスキャン順に画素を選択する。   In step S801, the allocation vector determination unit 801 selects a pixel of the interpolation frame in the allocation flag memory 56 as a target pixel, and the process proceeds to step S802. At this time, the allocation vector determination unit 801 selects pixels from the upper left pixel of the frame in the raster scan order.

割付ベクトル判定部801は、ステップS802において、割付フラグメモリ56内の着目画素の割付フラグが、0(False)であるか否かを判断し、割付フラグメモリ56内の着目画素の割付フラグが、0(False)であると判断した場合、動きベクトルが割り付けられていないと判定し、ステップS803に進み、補償処理部811を制御し、ベクトル補償処理を実行させ、ステップS804に進む。このベクトル補償処理の詳細は、図66を参照して後述するが、このベクトル補償処理により、周辺画素に割り付けられた動きベクトルの中から、評価値DFDの最小の動きベクトルが補償候補ベクトルとしてメモリ821に記憶される。   In step S802, the allocation vector determination unit 801 determines whether the allocation flag of the target pixel in the allocation flag memory 56 is 0 (False), and the allocation flag of the target pixel in the allocation flag memory 56 is If it is determined that the motion vector is 0 (False), it is determined that no motion vector is allocated, and the process proceeds to step S803, the compensation processing unit 811 is controlled to execute the vector compensation process, and the process proceeds to step S804. Details of this vector compensation processing will be described later with reference to FIG. 66. By this vector compensation processing, among the motion vectors assigned to the peripheral pixels, the smallest motion vector of the evaluation value DFD is stored as a compensation candidate vector. 821 is stored.

補償処理部811は、ステップS804において、メモリ821の補償候補ベクトルを、着目画素の動きベクトルとして、割付ベクトルメモリ55に割り付け、ステップS805に進み、割付フラグメモリ56の着目画素の割り付けフラグを、1(True)に書き換え、ステップS806に進む。   In step S804, the compensation processing unit 811 allocates the compensation candidate vector in the memory 821 as the motion vector of the target pixel to the allocation vector memory 55, and proceeds to step S805 to set the target pixel allocation flag in the allocation flag memory 56 to 1 Rewrite to (True), and go to Step S806.

一方、ステップS802において、割付ベクトル判定部801は、割付フラグメモリ56内の着目画素の割付フラグが、1(True)であると判断した場合、その着目画素にはすでに動きベクトルが割り付けられていると判定して、ステップS803乃至S805の処理をスキップし、ステップS806に進む。   On the other hand, if the allocation vector determination unit 801 determines in step S802 that the allocation flag of the target pixel in the allocation flag memory 56 is 1 (True), a motion vector has already been allocated to the target pixel. Is determined, the process of steps S803 to S805 is skipped, and the process proceeds to step S806.

割付ベクトル判定部801は、ステップS806において、割付フラグメモリ56の内挿フレームのすべての画素の処理を終了したか否かを判断し、すべての画素の処理を終了していないと判断した場合、ステップS801に戻り、割付フラグメモリ56の内挿フレームの次の画素を、着目画素として選択し、それ以降の処理を実行する。ステップS806において、割付フラグメモリ56の内挿フレームのすべての画素の処理を終了したと判断した場合、割付補償処理を終了する。   In step S806, the allocation vector determination unit 801 determines whether or not the processing of all the pixels in the interpolation frame of the allocation flag memory 56 has been completed, and determines that the processing of all the pixels has not been completed. Returning to step S801, the next pixel of the interpolation frame in the allocation flag memory 56 is selected as the pixel of interest, and the subsequent processing is executed. If it is determined in step S806 that the processing of all the pixels in the interpolation frame in the allocation flag memory 56 has been completed, the allocation compensation processing is terminated.

次に、図66のフローチャートを参照して、ベクトル補償処理の詳細を説明する。なお、図66は、図65のステップS803のベクトル補償処理の例を示している。   Next, the details of the vector compensation processing will be described with reference to the flowchart of FIG. FIG. 66 shows an example of the vector compensation processing in step S803 of FIG.

補償処理部811は、ステップS821において、評価値演算部812を制御し、0ベクトルを用いて評価値DFD0を算出させ、ステップS822に進む。具体的には、評価値演算部812は、ステップS821において、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、例えば、図61を参照して上述したように、着目画素について、0ベクトルでの評価値DFD0を演算し、演算した評価値DFD0を補償処理部811に出力する。   In step S821, the compensation processing unit 811 controls the evaluation value calculation unit 812 to calculate the evaluation value DFD0 using the 0 vector, and the process proceeds to step S822. Specifically, in step S821, the evaluation value calculation unit 812 uses the frame t of the image at time t and the frame t + 1 of the image at time t + 1, for example, as described above with reference to FIG. In addition, for the pixel of interest, an evaluation value DFD0 with a 0 vector is calculated, and the calculated evaluation value DFD0 is output to the compensation processing unit 811.

ステップS822において、補償処理部811は、評価値DFD0を最小評価値としてメモリ821に記憶し、ステップS823に進み、0ベクトルを補償候補ベクトルとして、メモリ821に記憶し、ステップS824に進む。補償処理部811は、ステップS824において、割付ベクトル判定部801により選択された着目画素の周辺8画素のうち、1つの周辺画素を選択し、ステップS825に進む。このとき、補償処理部811は、周辺8画素のうち、左上の画素からラスタスキャン順に周辺画素を選択する。   In step S822, the compensation processing unit 811 stores the evaluation value DFD0 as the minimum evaluation value in the memory 821, proceeds to step S823, stores the 0 vector as the compensation candidate vector in the memory 821, and proceeds to step S824. In step S824, the compensation processing unit 811 selects one peripheral pixel from the eight peripheral pixels of the target pixel selected by the allocation vector determination unit 801, and the process proceeds to step S825. At this time, the compensation processing unit 811 selects peripheral pixels in the raster scan order from the upper left pixel among the eight peripheral pixels.

補償処理部811は、ステップS825において、割付フラグメモリ56を参照し、選択した周辺画素の動きベクトルが存在するか否かを判断する。割付フラグメモリ56の周辺画素の割付フラグが1(True)であれば、補償処理部811は、ステップS825において、選択した周辺画素に割り付けられている動きベクトルが存在すると判断し、ステップS826に進み、割付ベクトルメモリ55から、周辺画素の動きベクトルを取得し、ステップS827に進む。このとき、割付ベクトルメモリ55から評価値演算部812にも周辺画素の動きベクトルが出力される。   In step S825, the compensation processing unit 811 refers to the allocation flag memory 56 and determines whether there is a motion vector of the selected peripheral pixel. If the allocation flag of the peripheral pixel in the allocation flag memory 56 is 1 (True), the compensation processing unit 811 determines in step S825 that there is a motion vector allocated to the selected peripheral pixel, and the process proceeds to step S826. Then, the motion vectors of the surrounding pixels are acquired from the allocation vector memory 55, and the process proceeds to step S827. At this time, the motion vectors of the surrounding pixels are also output from the allocation vector memory 55 to the evaluation value calculation unit 812.

評価値演算部812は、割付ベクトルメモリ55から周辺画素の動きベクトルが入力されると、ステップS827において、入力される時刻tの画像のフレームtと、時刻t+1の画像のフレームt+1を用いて、着目画素について、割付ベクトルメモリ55からの動きベクトルの評価値DFDを演算し、演算した評価値DFDを、補償処理部811に出力し、ステップS828に進む。   When the motion vector of the neighboring pixels is input from the allocation vector memory 55, the evaluation value calculation unit 812 uses the input frame t of the image at time t and the frame t + 1 of the image at time t + 1 in step S827. For the pixel of interest, the motion vector evaluation value DFD from the allocation vector memory 55 is calculated, and the calculated evaluation value DFD is output to the compensation processing unit 811, and the process proceeds to step S 828.

補償処理部811は、評価値演算部812から評価値DFDが入力されると、ステップS828において、評価値DFDが、メモリ821に記憶されている着目画素の最小評価値よりも小さいか否かを判断し、評価値DFDが、メモリ821に記憶されている着目画素の最小評価値よりも小さいと判断した場合、ステップS829に進み、メモリ821の最小評価値を、最小評価値よりも小さいと判断された評価値DFDに書き換え、ステップS830に進み、メモリ821の補償候補ベクトルを、その最小評価値の動きベクトルに書き換え、ステップS831に進む。   When the evaluation value DFD is input from the evaluation value calculation unit 812, the compensation processing unit 811 determines whether or not the evaluation value DFD is smaller than the minimum evaluation value of the target pixel stored in the memory 821 in step S828. If it is determined that the evaluation value DFD is smaller than the minimum evaluation value of the target pixel stored in the memory 821, the process proceeds to step S829, and the minimum evaluation value of the memory 821 is determined to be smaller than the minimum evaluation value. The evaluation value DFD is rewritten, and the process proceeds to step S830. The compensation candidate vector in the memory 821 is rewritten to the motion vector of the minimum evaluation value, and the process proceeds to step S831.

一方、ステップS825において、割付フラグメモリ56の周辺画素の割付フラグが0(False)であると、補償処理部811は、選択した周辺画素に割り付けられている動きベクトルがないと判断し、ステップS826乃至S830の処理をスキップし、ステップS831に進む。また、ステップS828において、補償処理部811は、評価値DFDが、メモリ821に記憶されている着目画素の最小評価値以上であると判断した場合、ステップS829およびS830の処理をスキップし、ステップS831に進む。   On the other hand, if the allocation flag of the peripheral pixel in the allocation flag memory 56 is 0 (False) in step S825, the compensation processing unit 811 determines that there is no motion vector allocated to the selected peripheral pixel, and step S826. The process of thru | or S830 is skipped and it progresses to step S831. In step S828, when the compensation processing unit 811 determines that the evaluation value DFD is greater than or equal to the minimum evaluation value of the pixel of interest stored in the memory 821, the processing of steps S829 and S830 is skipped, and step S831 is performed. Proceed to

補償処理部811は、ステップS831において、着目画素の周辺8画素すべてに対して処理が終了したか否かを判断し、着目画素の周辺8画素すべてに対して処理が終了していないと判断した場合、ステップS824に戻り、次の周辺画素を選択し、それ以降の処理を繰り返す。また、補償処理部811は、ステップS831において、着目画素の周辺8画素すべてに対して処理が終了したと判断した場合、ベクトル補償処理を終了し、図65のステップS804に戻る。   In step S831, the compensation processing unit 811 determines whether or not the processing has been completed for all eight pixels around the target pixel, and determines that the processing has not been completed for all eight pixels around the target pixel. If so, the process returns to step S824, the next peripheral pixel is selected, and the subsequent processing is repeated. If the compensation processing unit 811 determines in step S831 that the processing has been completed for all eight pixels around the pixel of interest, the compensation processing unit 811 ends the vector compensation processing and returns to step S804 in FIG.

以上のように、ベクトル割付処理において、割り付けることができなかった画素に関しても、動き相関があることを利用して、その画素の周辺の動きベクトルの中から、評価値DFDに基づく、最も信頼度がある、確からしい動きベクトルを得ることができる。これにより、ベクトルが割り付けられず、0ベクトルなどを割り付けておく場合よりも、ベクトル割付の精度が向上し、後段の画像補間処理において生成される画像の不連続性を抑制することができる。   As described above, the most reliable level based on the evaluation value DFD is obtained from the motion vectors around the pixel using the fact that there is a motion correlation even for the pixel that cannot be assigned in the vector assignment processing. There is a certain motion vector. As a result, the accuracy of vector assignment is improved as compared with the case where a vector is not assigned and a 0 vector is assigned, and discontinuity of an image generated in subsequent image interpolation processing can be suppressed.

また、上述した割付補償処理により動きベクトルが割り付けられた画素の割付フラグを1(True)に書き換えるようにし、割付補償処理により割り付けられた動きベクトルも、次の画素の補償候補ベクトルとして用いるようにしたので、オブジェクト内でほぼ同じ動きをする画素には、ほぼ同一の動きベクトルが選択されるようになり、誤りの少ない安定した動きベクトルを得ることができる。その結果、後段において生成される画像のブロックノイズや粉状ノイズなどを抑制し、品質を向上させることができる。   In addition, the allocation flag of the pixel to which the motion vector is allocated by the allocation compensation process described above is rewritten to 1 (True), and the motion vector allocated by the allocation compensation process is also used as a compensation candidate vector for the next pixel. Therefore, almost the same motion vector is selected for pixels that perform substantially the same motion in the object, and a stable motion vector with few errors can be obtained. As a result, it is possible to improve the quality by suppressing block noise, powder noise and the like of the image generated in the subsequent stage.

また、動きベクトルを求める着目画素について、0ベクトルの評価値DFDを予め算出し、最小評価値としてメモリに保持しておくことにより、すべての補償候補ベクトル評価値DFDを一度に算出し、その中から最小の評価値DFDを選択する場合よりも、時間とリソースを効率的に使用することができる。   In addition, for a pixel of interest for which a motion vector is to be calculated, an evaluation value DFD of 0 vector is calculated in advance and stored in a memory as a minimum evaluation value, so that all compensation candidate vector evaluation values DFD are calculated at once. Thus, time and resources can be used more efficiently than when the smallest evaluation value DFD is selected.

なお、上記説明においては、ベクトル割付部54において割り付けられなかった画素に対してベクトル補償処理を行っているが、ベクトル検出部52において検出されなかった(0ベクトルが検出された)画素など、何らかの処理において動きベクトルが求められなかった画素に対してベクトル補償処理を行うようにしてもよい。また、さらに、検出された動きベクトル、または、割り付けられた動きベクトルが確からしくない(信頼度が低い)とされる画素に対してベクトル補償処理を行うようにしてもよい。   In the above description, the vector compensation processing is performed on the pixels that are not assigned by the vector assigning unit 54, but there are some kinds of pixels such as pixels that are not detected by the vector detecting unit 52 (the zero vector is detected). You may make it perform a vector compensation process with respect to the pixel in which the motion vector was not calculated | required in the process. Furthermore, vector compensation processing may be performed on pixels for which the detected motion vector or the assigned motion vector is uncertain (low reliability).

本実施の形態においては、動きベクトルを選択する際の評価値として、差分絶対値和である評価値DFDを用いて説明したが、評価値DFDに限定されず、動きベクトルの信頼度を評価するものであれば、他のものを用いるようにしてもよい。   In this embodiment, the evaluation value DFD that is the sum of absolute differences is used as the evaluation value when selecting a motion vector. However, the evaluation value DFD is not limited to the evaluation value DFD, and the reliability of the motion vector is evaluated. If it is a thing, you may make it use another thing.

また、本実施の形態においては、動きベクトルを、勾配法を用いて検出する場合について説明したが、ブロックマッチング法などを用いて検出された動きベクトルに基づいて、上述したベクトル割付処理、割付補償処理、または画像補間処理などの動きベクトル検出以降の処理が実行されてもよい。   In the present embodiment, the case where the motion vector is detected using the gradient method has been described. However, the above-described vector allocation processing and allocation compensation are performed based on the motion vector detected using the block matching method or the like. Processing after motion vector detection such as processing or image interpolation processing may be executed.

さらに、本実施の形態においては、各処理を行うブロックを、例えば、8画素×8画素や9画素×9画素などにより構成するようにして説明したが、これらは、一例であり、各処理を行うブロックを構成する画素は、上記画素数に限定されない。   Furthermore, in the present embodiment, the block for performing each process has been described as being configured by, for example, 8 pixels × 8 pixels, 9 pixels × 9 pixels, and the like, but these are examples, and each process is performed. The number of pixels constituting the block to be performed is not limited to the number of pixels.

また、本実施の形態においては、24P信号から60P信号への信号変換を例に、説明を行ったが、本発明は、例えば、動画像のフレーム周波数変換として、インターレース信号や、他のフレームレート変換にも適用することができる。   In this embodiment, the signal conversion from the 24P signal to the 60P signal has been described as an example. However, the present invention is, for example, an interlace signal or other frame rate as the frame frequency conversion of a moving image. It can also be applied to conversion.

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

コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプログラムを格納するプログラム格納媒体は、図1に示されるように、磁気ディスク31(フレキシブルディスクを含む)、光ディスク32(CD-ROM(Compact Disc-Read Only Memory)、DVD(Digital Versatile Disc)を含む)、光磁気ディスク33(MD(Mini-Disc)(商標)を含む)、もしくは半導体メモリ34などよりなるリムーバブル記録媒体(パッケージメディア)、または、プログラムが一時的もしくは永続的に格納されるROM12などにより構成される。   As shown in FIG. 1, a program storage medium that stores a program that is installed in a computer and can be executed by the computer includes a magnetic disk 31 (including a flexible disk), an optical disk 32 (CD-ROM (Compact Disc -Removable recording media (package media) comprising a read only memory (including DVD (Digital Versatile Disc)), magneto-optical disc 33 (including MD (Mini-Disc) (trademark)), or semiconductor memory 34, or The ROM 12 stores the program temporarily or permanently.

なお、本明細書において、フローチャートに示されるステップは、記載された順序に従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the steps shown in the flowcharts include not only processes performed in time series according to the described order, but also processes executed in parallel or individually even if not necessarily performed in time series. Is included.

本発明の信号処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the signal processing apparatus of this invention. 信号処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of a signal processing apparatus. 本発明の処理の原理を説明する図である。It is a figure explaining the principle of the process of this invention. 本発明の処理を具体的に説明する図である。It is a figure explaining the process of this invention concretely. 信号処理装置において用いられる動きベクトルの評価値を説明する図である。It is a figure explaining the evaluation value of the motion vector used in a signal processor. 信号処理装置のフレーム周波数変換処理を説明するフローチャートである。It is a flowchart explaining the frame frequency conversion process of a signal processing apparatus. 画像補間部の構成を示すブロック図である。It is a block diagram which shows the structure of an image interpolation part. 画像補間処理を説明するフローチャートである。It is a flowchart explaining an image interpolation process. ベクトル検出部の構成を示すブロック図である。It is a block diagram which shows the structure of a vector detection part. ベクトル検出部で用いられる勾配法を説明する図である。It is a figure explaining the gradient method used in a vector detection part. 初期ベクトルを用いた反復勾配法を説明する図である。It is a figure explaining the iterative gradient method using an initial vector. 動きベクトル検出処理を説明するフローチャートである。It is a flowchart explaining a motion vector detection process. シフト初期ベクトル割付部の構成を示すブロック図である。It is a block diagram which shows the structure of a shift initial vector allocation part. シフト初期ベクトルの概念を説明する図である。It is a figure explaining the concept of a shift initial vector. シフト初期ベクトルを具体的に説明する図である。It is a figure explaining a shift initial vector concretely. シフト初期ベクトルを具体的に説明する図である。It is a figure explaining a shift initial vector concretely. シフト初期ベクトルの決定方法を説明する図である。It is a figure explaining the determination method of a shift initial vector. シフト初期ベクトルの割り付けの例を説明する図である。It is a figure explaining the example of allocation of a shift initial vector. 動きベクトルが競合する場合のシフト初期ベクトルの例を説明する図である。It is a figure explaining the example of a shift initial vector in case a motion vector competes. シフト初期ベクトル割付処理を説明するフローチャートである。It is a flowchart explaining a shift initial vector allocation process. 初期ベクトル選択部の構成を示すブロック図である。It is a block diagram which shows the structure of an initial vector selection part. 初期ベクトルの周辺領域を示す図である。It is a figure which shows the peripheral area | region of an initial vector. 初期ベクトルの候補ブロックを示す図である。It is a figure which shows the candidate block of an initial vector. 初期ベクトル選択処理を説明するフローチャートである。It is a flowchart explaining an initial vector selection process. 反復勾配法演算部の構成を示すブロック図である。It is a block diagram which shows the structure of an iterative gradient method calculating part. 有効画素判定部の構成を示すブロック図である。It is a block diagram which shows the structure of an effective pixel determination part. 勾配法演算部の構成を示すブロック図である。It is a block diagram which shows the structure of a gradient method calculating part. 動きベクトルの検出対象ブロックと演算ブロックを説明する図である。It is a figure explaining the detection target block and calculation block of a motion vector. 検出対象ブロックにおけるオブジェクトの動きを説明する図である。It is a figure explaining the motion of the object in a detection target block. 同じ動きのオブジェクトを有する検出対象ブロックにおける輝度の状態を説明する図である。It is a figure explaining the state of the brightness | luminance in the detection target block which has the object of the same motion. 異なる動きのオブジェクトを有する検出対象ブロックにおける輝度の状態を説明する図である。It is a figure explaining the state of the brightness | luminance in the detection target block which has an object of a different motion. 画素単位処理の演算ブロックの例を説明する図である。It is a figure explaining the example of the calculation block of a pixel unit process. 図29の検出対象ブロックにおける画素単位処理を説明する図である。It is a figure explaining the pixel unit process in the detection object block of FIG. 反復勾配法演算処理を説明するフローチャートである。It is a flowchart explaining an iterative gradient method calculation process. 有効画素判定処理を説明するフローチャートである。It is a flowchart explaining an effective pixel determination process. 勾配法演算処理を説明するフローチャートである。It is a flowchart explaining a gradient method calculation process. 画素単位の反復勾配法演算処理を説明するフローチャートである。It is a flowchart explaining the iterative gradient method calculation process of a pixel unit. ベクトル割付部の構成を示すブロック図である。It is a block diagram which shows the structure of a vector allocation part. 本発明の4点補間処理の概念を説明する図である。It is a figure explaining the concept of the 4-point interpolation process of this invention. ベクトル割付処理の概要を説明する図である。It is a figure explaining the outline | summary of a vector allocation process. 動きベクトルと内挿フレームの交点の近傍画素の例を説明する図である。It is a figure explaining the example of the neighborhood pixel of the intersection of a motion vector and an interpolation frame. 割付候補の動きベクトルの評価方法を説明する図である。It is a figure explaining the evaluation method of the motion vector of an allocation candidate. ベクトル割付における4点補間の例を説明する図である。It is a figure explaining the example of 4-point interpolation in vector allocation. ベクトル割付処理を説明するフローチャートである。It is a flowchart explaining a vector allocation process. 図44のステップS705の画素位置演算処理を説明するフローチャートである。It is a flowchart explaining the pixel position calculation process of step S705 of FIG. 図44のステップS707の割付ベクトル評価処理を説明するフローチャートである。It is a flowchart explaining the allocation vector evaluation process of step S707 of FIG. ベクトル割付部の他の構成を示すブロック図である。It is a block diagram which shows the other structure of a vector allocation part. 図47のベクトル割付部の割付候補の動きベクトルの評価方法を説明する図である。It is a figure explaining the evaluation method of the motion vector of the allocation candidate of the vector allocation part of FIG. 「貫き」を説明する図である。It is a figure explaining "penetration". 図47のベクトル割付部のベクトル割付処理を説明するフローチャートである。It is a flowchart explaining the vector allocation process of the vector allocation part of FIG. 図50のステップS763の画素位置演算処理を説明するフローチャートである。51 is a flowchart for describing pixel position calculation processing in step S763 in FIG. 50. 図50のステップS764の割付ベクトル評価処理を説明するフローチャートである。FIG. 51 is a flowchart for describing an allocation vector evaluation process in step S764 of FIG. 50. FIG. 割付補償部の構成を示すブロック図である。It is a block diagram which shows the structure of an allocation compensation part. ベクトル補償部の構成を示すブロック図である。It is a block diagram which shows the structure of a vector compensation part. 割付補償処理の原理を説明する図である。It is a figure explaining the principle of an allocation compensation process. 動き相関の原理を説明する図である。It is a figure explaining the principle of motion correlation. 着目画素の周囲画素の構成例を説明する図である。It is a figure explaining the structural example of the surrounding pixel of a focused pixel. 着目画素の動きベクトルの補償候補ベクトルの例を説明する図である。It is a figure explaining the example of the compensation candidate vector of the motion vector of the focused pixel. 着目画素の動きベクトルの補償候補ベクトルの例を説明する図である。It is a figure explaining the example of the compensation candidate vector of the motion vector of the focused pixel. 着目画素の動きベクトルの補償候補ベクトルの例を説明する図である。It is a figure explaining the example of the compensation candidate vector of the motion vector of the focused pixel. 補償候補ベクトルを評価する例を説明する図である。It is a figure explaining the example which evaluates a compensation candidate vector. 補償候補ベクトルを評価する例を説明する図である。It is a figure explaining the example which evaluates a compensation candidate vector. 補償候補ベクトルを評価する例を説明する図である。It is a figure explaining the example which evaluates a compensation candidate vector. 補償候補ベクトルを着目画素の動きベクトルとして選択する例を説明する図である。It is a figure explaining the example which selects a compensation candidate vector as a motion vector of a focused pixel. 割付補償処理を説明するフローチャートである。It is a flowchart explaining an allocation compensation process. ベクトル補償処理を説明するフローチャートである。It is a flowchart explaining a vector compensation process.

符号の説明Explanation of symbols

1 信号処理装置,11 CPU,12 ROM,13 RAM,31 磁気ディスク,32 光ディスク,33 光磁気ディスク,34 半導体メモリ,51 フレームメモリ,52 ベクトル検出部,53 検出ベクトルメモリ,54 ベクトル割付部,55 割付ベクトルメモリ,56 割付フラグメモリ,57 割付補償部,58 画像補間部,101 初期ベクトル選択部,103 反復勾配法演算部,104 ベクトル評価部,105 シフト初期ベクトル割付部,106 評価値メモリ,107 シフト初期ベクトルメモリ,201 割付対象位置演算部,202 評価値比較部,203 シフト初期ベクトル置換部,204 評価値置換部,251 候補ベクトル位置演算部,252 検出ベクトル取得部,253 シフト初期ベクトル取得部,254 オフセット位置演算部,255 評価値演算部,256 評価値比較部,257 最適候補格納用レジスタ,401 モード選択部,402 セレクタ,403 有効画素判定部,404 勾配法演算部,405 遅延部,411 時間画素差分算出部,412 画素差分値判定部,413 有効画素数カウンタ,414 勾配法継続判定部,421 時間画素差分算出部,422 画素差分値判定部,423 水平垂直画素差分算出部,424 勾配積算部,425 ベクトル算出部,701 画素情報演算部,702 評価値演算部,703 着目画素差分演算部,704 ベクトル評価部,705 ベクトル選択部,711 画素差分判断部,712 評価値判断部,751 画素情報演算部,752 評価値演算部,753 ベクトル評価部,754 ベクトル選択部,801 割付ベクトル判定部,802 ベクトル割付部,811 補償処理部,812 評価値演算部,821 メモリ   DESCRIPTION OF SYMBOLS 1 Signal processing apparatus, 11 CPU, 12 ROM, 13 RAM, 31 Magnetic disk, 32 Optical disk, 33 Magneto-optical disk, 34 Semiconductor memory, 51 Frame memory, 52 Vector detection part, 53 Detection vector memory, 54 Vector allocation part, 55 Allocation vector memory, 56 Allocation flag memory, 57 Allocation compensation unit, 58 Image interpolation unit, 101 Initial vector selection unit, 103 Iterative gradient method calculation unit, 104 Vector evaluation unit, 105 Shift initial vector allocation unit, 106 Evaluation value memory, 107 Shift initial vector memory, 201 allocation target position calculation unit, 202 evaluation value comparison unit, 203 shift initial vector replacement unit, 204 evaluation value replacement unit, 251 candidate vector position calculation unit, 252 detection vector acquisition unit, 253 shift initial vector acquisition unit , 254 Offset position calculation unit, 255 evaluation value calculation unit, 256 evaluation value comparison unit, 257 optimum candidate storage register, 401 mode selection unit, 402 selector, 403 effective pixel determination unit, 404 gradient method calculation unit, 405 delay unit, 411 Time pixel difference calculation unit, 412 pixel difference value determination unit, 413 effective pixel number counter, 414 gradient method continuation determination unit, 421 time pixel difference calculation unit, 422 pixel difference value determination unit, 423 horizontal / vertical pixel difference calculation unit, 424 gradient Integration unit, 425 vector calculation unit, 701 pixel information calculation unit, 702 evaluation value calculation unit, 703 focused pixel difference calculation unit, 704 vector evaluation unit, 705 vector selection unit, 711 pixel difference determination unit, 712 evaluation value determination unit, 751 Pixel information calculation section, 752 evaluation value calculation section, 753 vector evaluation section, 54 vector selecting unit, 801 allocated vector determining unit 802 vector allocating unit, 811 compensation processing unit, 812 evaluation value calculation unit, 821 memory

Claims (5)

第1のフレーム上の動きベクトルを検出し、検出された前記動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置において、
前記第1のフレーム上において検出された動きベクトルと、前記動きベクトルの前記第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出手段と、
前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致する場合、前記交点と一致する前記画素を、前記動きベクトルを割り付ける対象となる着目画素として選択し、前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致しない場合、前記交点の近傍4画素を、前記着目画素として選択する着目画素選択手段と、
前記着目画素選択手段により選択された前記着目画素毎に、前記差異性算出手段により算出された前記差異性が、前記着目画素に割り付けられる可能性がある他の動きベクトルについて算出された前記差異性よりも小さいか否かを判定する差異性判定手段と、
前記差異性判定手段により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性よりも小さいと判定された前記着目画素に、前記動きベクトルを割り付け、前記差異性判定手段により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性より小さいと判定されなかった前記着目画素に、前記他の動きベクトルを割り付けるベクトル割付手段と
を備える画像処理装置。
In an image processing apparatus for detecting a motion vector on a first frame and generating a pixel value on a second frame based on the detected motion vector,
A difference calculating means for calculating a difference between a motion vector detected on the first frame and a surrounding motion vector on the first frame of the motion vector;
If the intersection of the motion vector and the second frame matches a pixel on the second frame, select the pixel that matches the intersection as a pixel of interest to which the motion vector is assigned; Pixel-of-interest selection means for selecting four pixels in the vicinity of the intersection as the pixel of interest when an intersection of the motion vector and the second frame does not coincide with a pixel on the second frame;
For each pixel of interest selected by the pixel-of- interest selection unit, the difference calculated by the difference calculation unit is calculated for other motion vectors that may be assigned to the pixel of interest. Difference determining means for determining whether or not the difference is smaller than,
The motion vector is allocated to the pixel of interest determined that the difference calculated by the difference determination unit is smaller than the difference calculated for the other motion vector, and the difference determination unit An image processing apparatus comprising: a vector allocating unit that allocates the other motion vector to the pixel of interest for which the calculated difference is not determined to be smaller than the difference calculated for the other motion vector .
前記第1のフレーム上の前記動きベクトルを検出する動きベクトル検出手段と、
前記ベクトル割付手段により前記着目画素に割り付けられた前記動きベクトルに基づいて、前記第2のフレーム上の前記画素値を補間することにより生成する画素補間生成手段と
をさらに備える請求項1に記載の画像処理装置。
Motion vector detection means for detecting the motion vector on the first frame;
2. The pixel interpolation generation unit that generates by interpolating the pixel value on the second frame based on the motion vector allocated to the pixel of interest by the vector allocation unit. Image processing device.
第1のフレーム上の動きベクトルを検出し、検出された前記動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置の画像処理方法において、
前記画像処理装置が、
前記第1のフレーム上において検出された動きベクトルと、前記動きベクトルの前記第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、
前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致する場合、前記交点と一致する前記画素を、前記動きベクトルを割り付ける対象となる着目画素として選択し、前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致しない場合、前記交点の近傍4画素を、前記着目画素として選択する着目画素選択ステップと、
前記着目画素選択ステップの処理により選択された前記着目画素毎に、前記差異性算出ステップの処理により算出された前記差異性が、前記着目画素に割り付けられる可能性がある他の動きベクトルについて算出された前記差異性よりも小さいか否かを判定する差異性判定ステップと、
前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性よりも小さいと判定された前記着目画素に、前記動きベクトルを割り付け、前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性より小さいと判定されなかった前記着目画素に、前記他の動きベクトルを割り付けるベクトル割付ステップと
を含む画像処理方法。
In an image processing method of an image processing apparatus for detecting a motion vector on a first frame and generating a pixel value on a second frame based on the detected motion vector,
The image processing apparatus is
A difference calculating step of calculating a difference between a motion vector detected on the first frame and a surrounding motion vector of the motion vector on the first frame;
If the intersection of the motion vector and the second frame matches a pixel on the second frame, select the pixel that matches the intersection as a pixel of interest to which the motion vector is assigned, A pixel-of-interest selection step of selecting, as the pixel of interest, four pixels in the vicinity of the intersection when an intersection of the motion vector and the second frame does not coincide with a pixel on the second frame;
For each target pixel selected by the process of selecting the target pixel, the difference calculated by the process of calculating the difference is calculated for other motion vectors that may be assigned to the target pixel. A difference determination step for determining whether the difference is smaller than the difference,
The motion vector is allocated to the pixel of interest for which the difference calculated by the process of the difference determination step is determined to be smaller than the difference calculated for the other motion vector, and the difference determination An image including a vector allocating step of allocating the other motion vector to the target pixel that has not been determined that the difference calculated by the processing of the step is smaller than the difference calculated for the other motion vector. Processing method.
第1のフレーム上の動きベクトルを検出し、検出された前記動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置のコンピュータに、
前記第1のフレーム上において検出された動きベクトルと、前記動きベクトルの前記第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、
前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致する場合、前記交点と一致する前記画素を、前記動きベクトルを割り付ける対象となる着目画素として選択し、前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致しない場合、前記交点の近傍4画素を、前記着目画素として選択する着目画素選択ステップと、
前記着目画素選択ステップの処理により選択された前記着目画素毎に、前記差異性算出ステップの処理により算出された前記差異性が、前記着目画素に割り付けられる可能性がある他の動きベクトルについて算出された前記差異性よりも小さいか否かを判定する差異性判定ステップと、
前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性よりも小さいと判定された前記着目画素に、前記動きベクトルを割り付け、前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性より小さいと判定されなかった前記着目画素に、前記他の動きベクトルを割り付けるベクトル割付ステップと
を含む処理を行わせるためのプログラムが記録される記録媒体。
A computer of an image processing apparatus that detects a motion vector on the first frame and generates a pixel value on the second frame based on the detected motion vector.
A difference calculating step of calculating a difference between a motion vector detected on the first frame and a surrounding motion vector of the motion vector on the first frame;
If the intersection of the motion vector and the second frame matches a pixel on the second frame, select the pixel that matches the intersection as a pixel of interest to which the motion vector is assigned, A pixel-of-interest selection step of selecting, as the pixel of interest, four pixels in the vicinity of the intersection when an intersection of the motion vector and the second frame does not coincide with a pixel on the second frame;
For each target pixel selected by the process of selecting the target pixel, the difference calculated by the process of calculating the difference is calculated for other motion vectors that may be assigned to the target pixel. A difference determination step for determining whether the difference is smaller than the difference,
The motion vector is allocated to the pixel of interest for which the difference calculated by the process of the difference determination step is determined to be smaller than the difference calculated for the other motion vector, and the difference determination A process of assigning the other motion vector to the target pixel that has not been determined that the difference calculated by the processing of the step is smaller than the difference calculated for the other motion vector. A recording medium on which a program for performing the operation is recorded.
第1のフレーム上の動きベクトルを検出し、検出された前記動きベクトルに基づいて、第2のフレーム上の画素値を生成する画像処理装置のコンピュータに、
前記第1のフレーム上において検出された動きベクトルと、前記動きベクトルの前記第1のフレーム上における周囲の動きベクトルとの差異性を算出する差異性算出ステップと、
前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致する場合、前記交点と一致する前記画素を、前記動きベクトルを割り付ける対象となる着目画素として選択し、前記動きベクトルと前記第2のフレームとの交点が、前記第2のフレーム上の画素と一致しない場合、前記交点の近傍4画素を、前記着目画素として選択する着目画素選択ステップと、
前記着目画素選択ステップの処理により選択された前記着目画素毎に、前記差異性算出ステップの処理により算出された前記差異性が、前記着目画素に割り付けられる可能性がある他の動きベクトルについて算出された前記差異性よりも小さいか否かを判定する差異性判定ステップと、
前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性よりも小さいと判定された前記着目画素に、前記動きベクトルを割り付け、前記差異性判定ステップの処理により算出された前記差異性が、前記他の動きベクトルについて算出された前記差異性より小さいと判定されなかった前記着目画素に、前記他の動きベクトルを割り付けるベクトル割付ステップと
を含む処理を行わせるためのプログラム。
A computer of an image processing apparatus that detects a motion vector on the first frame and generates a pixel value on the second frame based on the detected motion vector.
A difference calculating step of calculating a difference between a motion vector detected on the first frame and a surrounding motion vector of the motion vector on the first frame;
If the intersection of the motion vector and the second frame matches a pixel on the second frame, select the pixel that matches the intersection as a pixel of interest to which the motion vector is assigned, A pixel-of-interest selection step of selecting, as the pixel of interest, four pixels in the vicinity of the intersection when an intersection of the motion vector and the second frame does not coincide with a pixel on the second frame;
For each target pixel selected by the process of selecting the target pixel, the difference calculated by the process of calculating the difference is calculated for other motion vectors that may be assigned to the target pixel. A difference determination step for determining whether the difference is smaller than the difference,
The motion vector is allocated to the pixel of interest for which the difference calculated by the process of the difference determination step is determined to be smaller than the difference calculated for the other motion vector, and the difference determination A process including: a vector allocating step of allocating the other motion vector to the target pixel that has not been determined that the difference calculated by the processing of the step is smaller than the difference calculated for the other motion vector. A program to let you do.
JP2004295067A 2004-10-07 2004-10-07 Image processing apparatus and method, recording medium, and program Expired - Fee Related JP4432714B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004295067A JP4432714B2 (en) 2004-10-07 2004-10-07 Image processing apparatus and method, recording medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004295067A JP4432714B2 (en) 2004-10-07 2004-10-07 Image processing apparatus and method, recording medium, and program

Publications (2)

Publication Number Publication Date
JP2006109250A JP2006109250A (en) 2006-04-20
JP4432714B2 true JP4432714B2 (en) 2010-03-17

Family

ID=36378426

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004295067A Expired - Fee Related JP4432714B2 (en) 2004-10-07 2004-10-07 Image processing apparatus and method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP4432714B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4931884B2 (en) * 2008-09-04 2012-05-16 独立行政法人科学技術振興機構 Frame rate conversion apparatus, frame rate conversion method, and frame rate conversion program
JP5644097B2 (en) * 2009-12-08 2014-12-24 ソニー株式会社 Image processing apparatus, image processing method, and program
EP2544149A4 (en) 2011-03-22 2014-11-19 Morpho Inc Moving-body detection device, moving-body detection method, moving-body detection program, moving-body tracking device, moving-body tracking method, and moving-body tracking program
JP5470529B2 (en) * 2011-03-22 2014-04-16 株式会社モルフォ Motion detection device, motion detection method, and motion detection program

Also Published As

Publication number Publication date
JP2006109250A (en) 2006-04-20

Similar Documents

Publication Publication Date Title
JP4687994B2 (en) Image processing apparatus and method, recording medium, and program
JP4692846B2 (en) Image processing apparatus and method, recording medium, and program
JP4692845B2 (en) Image processing apparatus and method, recording medium, and program
JP4752407B2 (en) Image processing apparatus and method, program, and recording medium
JP2007074592A (en) Image processing apparatus and method thereof, program, and recording medium
JP4432714B2 (en) Image processing apparatus and method, recording medium, and program
JP4512983B2 (en) Image processing apparatus and method, recording medium, and program
JP4512982B2 (en) Image processing apparatus and method, recording medium, and program
JP4512984B2 (en) Image processing apparatus and method, recording medium, and program
JP4655214B2 (en) Image processing apparatus and method, program, and recording medium
JP4419069B2 (en) Image processing apparatus and method, recording medium, and program
JP4512985B2 (en) Image processing apparatus and method, recording medium, and program
JP4655217B2 (en) Image processing apparatus and method, recording medium, and program
JP2007110461A (en) Image processing device and method therefor, program and recording medium
JP4655216B2 (en) Image processing apparatus and method, and program
JP4835075B2 (en) Image processing apparatus and method, program, and recording medium
JP2007074586A (en) Image processing apparatus and method, program, and recording medium
JP4655215B2 (en) Image processing apparatus and method, and program
JP2007074589A (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: 20070522

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090521

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090721

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090929

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091110

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: 20091201

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: 20091214

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

Free format text: PAYMENT UNTIL: 20130108

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