JP4313820B2 - Motion vector detection device - Google Patents

Motion vector detection device Download PDF

Info

Publication number
JP4313820B2
JP4313820B2 JP2007009732A JP2007009732A JP4313820B2 JP 4313820 B2 JP4313820 B2 JP 4313820B2 JP 2007009732 A JP2007009732 A JP 2007009732A JP 2007009732 A JP2007009732 A JP 2007009732A JP 4313820 B2 JP4313820 B2 JP 4313820B2
Authority
JP
Japan
Prior art keywords
projection data
horizontal
motion vector
vertical
value
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
JP2007009732A
Other languages
Japanese (ja)
Other versions
JP2008176590A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007009732A priority Critical patent/JP4313820B2/en
Priority to PCT/JP2007/061723 priority patent/WO2008065764A1/en
Priority to CN2007800365742A priority patent/CN101523440B/en
Priority to EP07745013A priority patent/EP2088558B1/en
Publication of JP2008176590A publication Critical patent/JP2008176590A/en
Application granted granted Critical
Publication of JP4313820B2 publication Critical patent/JP4313820B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルを検出する動きベクトル検出装置に関するものである。   The present invention relates to a motion vector detection apparatus that detects a motion vector between frame images related to a previous frame and a subsequent frame that are in a time series relationship.

手振れ補正などに用いられるフレーム画像間の動きベクトル検出技術としては、特許文献1に記載されているように、時間的に連続する複数の画像毎の差分画像から、画素毎に周辺画素との画素値を比較し、方位毎に動きの方向を推定し、それらの動きベクトルの和の平均を計算することにより、画素毎の動きベクトルを計算し、局所的な動きベクトル(オプティカルフロー)を計算している。   As a motion vector detection technique between frame images used for camera shake correction or the like, as described in Patent Document 1, from a difference image for each of a plurality of temporally continuous images, a pixel with a peripheral pixel for each pixel Compare the values, estimate the direction of motion for each direction, calculate the average of the sum of those motion vectors, calculate the motion vector for each pixel, calculate the local motion vector (optical flow) ing.

このとき、画素毎に求められたオプティカルフローに対して、ノイズによる影響を削減(軽減)するために、周辺8画素を含む初期推定動きベクトルの和の平均を取るなどの平滑化処理がなされている。   At this time, in order to reduce (reduce) the influence of noise on the optical flow obtained for each pixel, a smoothing process such as averaging the sum of initial estimated motion vectors including the surrounding eight pixels is performed. Yes.

また、あるいは、特許文献2では、特許文献1と同様の平滑化手法を射影データに対して適用し、入力画像を各部分領域に分け、複数の部分領域毎に算出した動きベクトルを使って、画像全体の動きベクトルを算出している。   Alternatively, in Patent Document 2, a smoothing method similar to that in Patent Document 1 is applied to projection data, the input image is divided into partial areas, and motion vectors calculated for each of the partial areas are used. The motion vector of the entire image is calculated.

また、一般的に、ノイズを除去する手法として、特許文献3の図2に記載されているような、(1/4、1/2、1/4)からなる3タップの低域通過フィルタが用いられることが多い。   In general, as a technique for removing noise, a 3-tap low-pass filter composed of (1/4, 1/2, 1/4) as described in FIG. Often used.

特開平10−240945号公報JP-A-10-240945 特開2002−63578号公報JP 2002-63578 A 特許第3314556号公報Japanese Patent No. 3314556

特許文献1および特許文献2に開示された平滑化手法では、算出した動きベクトルを周辺画素結果と平均をとることにより平滑化を行っており、動きベクトル算出に用いる元画像や、射影データそのものに対してはノイズ除去を行っていない。そのため、ノイズを含んだデータを用いて動きベクトルの算出処理を行っており、周辺画素にまでノイズの影響が及んでいる場合には、正確に動きベクトルを算出できないという問題がある。   In the smoothing methods disclosed in Patent Document 1 and Patent Document 2, the calculated motion vector is smoothed by taking the average of the surrounding pixel results and the original image used for motion vector calculation or the projection data itself. On the other hand, noise removal is not performed. For this reason, the motion vector calculation process is performed using noise-containing data, and there is a problem in that the motion vector cannot be accurately calculated when the influence of noise reaches the surrounding pixels.

また、特許文献3に開示された低域通過フィルタを用いた平滑化手法では、適用される元画像や射影データの高周波成分(特性)を著しく損なうため、動きベクトル算出に際して必要な特性(特徴量)まで無くしてしまう可能性がある。   Further, in the smoothing method using the low-pass filter disclosed in Patent Document 3, the high-frequency components (characteristics) of the applied original image and projection data are significantly impaired. ) May be lost.

本発明は上記のような問題点を解消するためになされたものであり、動きベクトル算出に必要な特性(特徴量)を損なうことなく、ノイズ成分のみ除去(軽減)が可能な平滑化手段を有する動きベクトル検出装置を提供することを目的とする。   The present invention has been made to solve the above-described problems, and smoothing means that can remove (reduce) only noise components without impairing the characteristics (features) necessary for motion vector calculation. It is an object of the present invention to provide a motion vector detection device having the above.

本発明に係る請求項1記載の動きベクトル検出装置は、時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルを検出する動きベクトル検出装置であって、水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像に関して、前記フレーム画像における所定の画像領域について垂直方向のエッジを強調するエッジ強調手段と、前記エッジ強調手段でエッジが強調された画像について垂直方向に射影をとり、1水平ライン分のデータ配列を有する射影データを生成する射影手段と、前記射影データに重畳された変動ノイズを除去して平滑化射影データを得る平滑化手段と、前記前フレームに対して前記平滑化射影データに関して、前記データ配列の要素順に配列要素の値をグラフ化した波形と、配列要素の値が所定の一定値となる直線とが交差する各交差点の配列要素の位置を特定する特定手段と、前記各交差点の配列要素の位置を中心とした所定範囲のデータ配列を、前記後フレームに対して前記平滑化射影データから抽出する抽出手段と、前記抽出手段で抽出された所定範囲のデータ配列それぞれについて、前記各交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値を加算する加算手段と、前記加算手段で加算された加算結果に基づき、前記フレーム画像の所定の画像領域についての水平方向動きベクトルを検出する検出手段と、を備えている。   The motion vector detection device according to claim 1 according to the present invention is a motion vector detection device for detecting a motion vector between frame images related to a previous frame and a rear frame that are in a time series relationship, and is a horizontal line. With respect to a frame image that is read out by repeating the pixel scanning in order in the vertical direction, an edge emphasizing unit that emphasizes an edge in the vertical direction for a predetermined image region in the frame image, and an image in which the edge is emphasized by the edge emphasizing unit Projection means for projecting in the vertical direction and generating projection data having a data array for one horizontal line; smoothing means for removing smoothing noise superimposed on the projection data to obtain smooth projection data; and Regarding the smoothed projection data with respect to the previous frame, the values of the array elements are set in the order of the elements of the data array. A specifying means for specifying the position of the array element at each intersection where the rough waveform and the straight line where the value of the array element is a predetermined constant value intersect, and a predetermined range centered on the position of the array element at each intersection For each of the data elements in a predetermined range extracted by the extraction means, relative to the position of the array element at each intersection. Adding means for adding values of array elements having the same position; and detecting means for detecting a horizontal motion vector for a predetermined image area of the frame image based on the addition result added by the adding means. ing.

本発明に係る請求項2記載の動きベクトル検出装置は、時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルを検出する動きベクトル検出装置であって、水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像に関して、前記フレーム画像における所定の画像領域について水平方向のエッジを強調するエッジ強調手段と、前記エッジ強調手段でエッジが強調された画像について水平方向に射影をとり、1垂直ライン分のデータ配列を有する射影データを生成する射影手段と、前記射影データに重畳された変動ノイズを除去して平滑化射影データを得る平滑化手段と、前記前フレームに対して前記平滑化射影データに関して前記データ配列の要素順に配列要素の値をグラフ化した波形と、配列要素の値が所定の一定値となる直線とが交差する各交差点の配列要素の位置を特定する特定手段と、前記各交差点の配列要素の位置を中心とした所定範囲のデータ配列を、前記後フレームに対して前記平滑化射影データから抽出する抽出手段と、前記抽出手段で抽出された所定範囲のデータ配列それぞれについて、前記各交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値を加算する加算手段と、前記加算手段で加算された加算結果に基づき、前記フレーム画像の所定の画像領域についての垂直方向動きベクトルを検出する検出手段と、を備えている。   The motion vector detection device according to claim 2 according to the present invention is a motion vector detection device for detecting a motion vector between frame images related to a previous frame and a subsequent frame that are in a time series relationship, and is a horizontal line. With respect to a frame image that is read out by repeating the pixel scanning in order in the vertical direction, an edge enhancement unit that emphasizes a horizontal edge in a predetermined image region in the frame image, and an image in which the edge is enhanced by the edge enhancement unit Projection means for projecting in the horizontal direction and generating projection data having a data arrangement for one vertical line; smoothing means for removing smoothing noise superimposed on the projection data to obtain smooth projection data; and The values of array elements are grouped in the order of the elements of the data array with respect to the smoothed projection data with respect to the previous frame. A specifying means for specifying the position of the array element at each intersection where the flattened waveform and the straight line having the predetermined value of the array element intersect, and a predetermined range centered on the position of the array element at each intersection For each of the data elements in a predetermined range extracted by the extraction means, relative to the position of the array element at each intersection. Adding means for adding values of array elements having the same position; and detecting means for detecting a vertical motion vector for a predetermined image area of the frame image based on the addition result added by the adding means. ing.

本発明に係る請求項1記載の動きベクトル検出装置によれば、平滑化手段において、動きベクトル検出に必要な射影データの特性を損なうことなく、重畳された変動ノイズを除去するため、より正確な水平方向動きベクトル検出が可能となる。   According to the motion vector detection device of the first aspect of the present invention, the smoothing means removes the superimposed fluctuation noise without impairing the characteristics of the projection data necessary for motion vector detection. Horizontal direction motion vector detection is possible.

本発明に係る請求項2記載の動きベクトル検出装置によれば、平滑化手段において、動きベクトル検出に必要な射影データの特性を損なうことなく、重畳された変動ノイズを除去するため、より正確な垂直方向動きベクトル検出が可能となる。   According to the motion vector detection device of the second aspect of the present invention, the smoothing means removes the superimposed fluctuation noise without impairing the characteristics of the projection data necessary for motion vector detection. Vertical motion vector detection is possible.

<実施の形態1>
<動きベクトル検出装置の構成>
図1は、本発明の実施の形態1に係る動きベクトル検出装置1の要部構成を示すブロック図である。
<Embodiment 1>
<Configuration of motion vector detection device>
FIG. 1 is a block diagram showing a main configuration of a motion vector detection device 1 according to Embodiment 1 of the present invention.

動きベクトル検出装置1は、例えば動画像において画面内の被写体の動きを表す画像動きベクトルを検出するものであり、時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルが検出される。この動きベクトル検出装置1で検出された動きベクトルはビデオカメラの手振れ補正などに利用される。なお、動きベクトル検出装置1に入力されるフレーム画像は、図2に示すように水平方向の画素走査および垂直方向のライン走査を行うことによって読み出されるものとする。   The motion vector detection device 1 detects, for example, an image motion vector that represents the motion of a subject in a screen in a moving image, and the motion between frame images related to a previous frame and a subsequent frame that are in a chronological order. A vector is detected. The motion vector detected by the motion vector detection device 1 is used for camera shake correction of the video camera. Note that the frame image input to the motion vector detection device 1 is read out by performing horizontal pixel scanning and vertical line scanning as shown in FIG.

動きベクトル検出装置1は、入力端子11と、水平方向動きベクトル検出部2および垂直方向動きベクトル検出部4と、2つの出力端子12、13とを備えている。この水平方向動きベクトル検出部2および垂直方向動きベクトル検出部4については、その機能が例えばマイクロプロセッサによってソフトウェア的に実現されてもよく、また大半をハードウエア(一部をソフトウェア)で実現するようにしてもよい。もちろん、全機能をハードウエアで実現しても良いことは言うまでもない。   The motion vector detection device 1 includes an input terminal 11, a horizontal direction motion vector detection unit 2 and a vertical direction motion vector detection unit 4, and two output terminals 12 and 13. The functions of the horizontal motion vector detection unit 2 and the vertical motion vector detection unit 4 may be realized by software by, for example, a microprocessor, and most of the functions are realized by hardware (partly software). It may be. Of course, it goes without saying that all functions may be realized by hardware.

入力端子11には、例えばビデオカメラ内の撮像素子で取得された画像(動画像)データやビデオ信号などの画像データが入力される。入力端子11に入力された画像データは、水平方向動きベクトル検出部2において水平方向の動きベクトルが検出され、その検出された水平方向動きベクトルが出力端子12から出力される。   For example, image data such as image (moving image) data or a video signal acquired by an image sensor in a video camera is input to the input terminal 11. In the image data input to the input terminal 11, a horizontal motion vector is detected by the horizontal motion vector detection unit 2, and the detected horizontal motion vector is output from the output terminal 12.

一方、垂直方向動きベクトル検出部4では、入力端子11に入力された画像データについて垂直方向の動きベクトルが検出される。この垂直方向動きベクトル検出部4で検出された垂直方向動きベクトルは、出力端子13から出力される。   On the other hand, the vertical motion vector detector 4 detects a vertical motion vector for the image data input to the input terminal 11. The vertical motion vector detected by the vertical motion vector detection unit 4 is output from the output terminal 13.

以下では、水平方向動きベクトル検出部2と垂直方向動きベクトル検出部4との構成を順に説明する。   Below, the structure of the horizontal direction motion vector detection part 2 and the vertical direction motion vector detection part 4 is demonstrated in order.

図3は、水平方向動きベクトル検出部2の要部構成を示すブロック図である。
水平方向動きベクトル検出部2は、入力端子20と、垂直方向画像分割部21と、垂直方向エッジ抽出フィルタリング部22と、垂直方向ブロック射影部23と、第1の垂直方向ブロック射影データ最大値保存部24と、ビット数削減部25と、第1の垂直方向ブロック射影ラインメモリ26と、垂直方向ブロック射影データ平滑部34とを備えている。また、水平方向動きベクトル検出部2は、第2の垂直方向ブロック射影ラインメモリ27と、第2の垂直方向ブロック射影データ最大値保存部28と、第1の閾値交差点探索部29と、垂直方向ブロック射影データ読み出し部30と、垂直方向ブロック水平方向動きベクトル算出部31と、水平方向動きベクトル決定部32と、出力端子33とを備えている。以上の水平方向動きベクトル検出部2の各部位について、その機能を簡単に説明する(具体的な動作は後で詳述する)。
FIG. 3 is a block diagram showing the main configuration of the horizontal motion vector detection unit 2.
The horizontal motion vector detection unit 2 includes an input terminal 20, a vertical image segmentation unit 21, a vertical edge extraction filtering unit 22, a vertical block projection unit 23, and a first vertical block projection data maximum value storage. A unit 24, a bit number reduction unit 25, a first vertical block projection line memory 26, and a vertical block projection data smoothing unit 34. The horizontal motion vector detection unit 2 includes a second vertical block projection line memory 27, a second vertical block projection data maximum value storage unit 28, a first threshold intersection search unit 29, and a vertical direction. A block projection data reading unit 30, a vertical block horizontal motion vector calculating unit 31, a horizontal motion vector determining unit 32, and an output terminal 33 are provided. The function of each part of the horizontal motion vector detection unit 2 described above will be briefly described (specific operations will be described in detail later).

垂直方向画像分割部21は、入力端子20に入力されたフレーム画像を垂直方向に分割し、垂直方向に分割したブロック(以下では「垂直方向ブロック」とも称する)を出力する。   The vertical image dividing unit 21 divides the frame image input to the input terminal 20 in the vertical direction and outputs a block divided in the vertical direction (hereinafter also referred to as “vertical block”).

垂直方向エッジ抽出フィルタリング部22は、垂直方向画像分割部21で分割されたブロック毎にエッジ抽出を行うためのフィルタリング処理を行う。   The vertical edge extraction filtering unit 22 performs a filtering process for performing edge extraction for each block divided by the vertical image dividing unit 21.

垂直方向ブロック射影部23は、垂直方向エッジ抽出フィルタリング部22から出力されるエッジ強調済みの垂直方向ブロックについて垂直方向に射影をとり、垂直方向ブロック毎に射影データを出力する。   The vertical block projection unit 23 projects the edge-enhanced vertical direction block output from the vertical edge extraction filtering unit 22 in the vertical direction and outputs projection data for each vertical block.

第1の垂直方向ブロック射影データ最大値保存部24は、垂直方向ブロック射影部23から出力された現フレームの垂直方向ブロックの射影データにおける最大値を保存する。
(以下では「現フレームの垂直方向ブロック射影データ最大値」または「第1の垂直方向ブロック射影データ最大値」とも言う)を保存する。また、第1の垂直方向ブロック射影データ最大値保存部24は、第1の垂直方向ブロック射影データ最大値に基づき、後述する第2の閾値を算出する。
The first vertical block projection data maximum value storage unit 24 stores the maximum value in the vertical block projection data of the current frame output from the vertical block projection unit 23.
(Hereinafter, also referred to as “vertical block projection data maximum value of the current frame” or “first vertical block projection data maximum value”). The first vertical block projection data maximum value storage unit 24 calculates a second threshold value to be described later based on the first vertical block projection data maximum value.

ビット数削減部25は、第1の垂直方向ブロック射影データ最大値保存部24に保存された第1の垂直方向ブロック射影データ最大値に基づき、垂直方向ブロック射影部23から出力された垂直方向ブロックの射影データのビット数を削減する。ビット数を削減された垂直方向ブロックの射影データを「第1の垂直方向ブロック射影データ」と称する。   The bit number reduction unit 25 is configured to output the vertical block output from the vertical block projection unit 23 based on the first vertical block projection data maximum value stored in the first vertical block projection data maximum value storage unit 24. Reduce the number of bits of projection data. The projection data of the vertical block in which the number of bits is reduced is referred to as “first vertical block projection data”.

第1の垂直方向ブロック射影ラインメモリ26は、ビット数削減部25でビット数が削減された第1の垂直方向ブロック射影データを保存する。   The first vertical block projection line memory 26 stores the first vertical block projection data whose bit number has been reduced by the bit number reduction unit 25.

垂直方向ブロック射影データ平滑化部34は、第1の垂直方向ブロック射影ラインメモリ26に保存された垂直方向ブロック射影データを読み出し、垂直方向ブロック射影データに重畳されている変動ノイズを除去し、平滑化した射影データ(以下では、平滑化射影データと記す)を第1の垂直方向ブロック射影ラインメモリ26に書き戻す。従って、以降の処理における「射影データ」とは、特に区別して記載しない場合も含めて、「平滑化された射影データ(平滑化射影データ)」のことであり、「第1の垂直方向ブロック射影データ」についても、平滑化射影データである。   The vertical block projection data smoothing unit 34 reads the vertical block projection data stored in the first vertical block projection line memory 26, removes the fluctuation noise superimposed on the vertical block projection data, and performs smoothing. The converted projection data (hereinafter referred to as smoothed projection data) is written back to the first vertical block projection line memory 26. Accordingly, the “projection data” in the subsequent processing is “smoothed projection data (smoothed projection data)”, including the case where it is not particularly distinguished and described, and “first vertical block projection”. “Data” is also the smoothed projection data.

第2の垂直方向ブロック射影ラインメモリ27は、第1の垂直方向ブロック射影ラインメモリ26から送られた垂直方向ブロック射影データを、前フレームの垂直方向ブロックの射影データ(以下では「第2の垂直方向ブロック射影データ」ともいう)として保存する。   The second vertical block projection line memory 27 converts the vertical block projection data sent from the first vertical block projection line memory 26 into the projection data of the vertical block of the previous frame (hereinafter referred to as “second vertical block projection data”). It is also saved as “direction block projection data”.

第2の垂直方向ブロック射影データ最大値保存部28は、第1の垂直方向ブロック射影データ最大値保存部24から出力された第1の垂直方向ブロック射影データ最大値を、前フレームに関する「第2の垂直方向ブロック射影データ最大値」(「前フレームの垂直方向ブロック射影データ最大値」とも言う)として保存する。また、第2の垂直方向ブロック射影データ最大値保存部28は、第2の垂直方向ブロック射影データ最大値に基づき、後述する第1の閾値を算出する。   The second vertical block projection data maximum value storage unit 28 uses the first vertical block projection data maximum value output from the first vertical block projection data maximum value storage unit 24 as the “second Is stored as “vertical block projection data maximum value” (also referred to as “vertical block projection data maximum value of previous frame”). Further, the second vertical block projection data maximum value storage unit 28 calculates a first threshold value to be described later based on the second vertical block projection data maximum value.

第1の閾値交差点探索部29は、第2の垂直方向ブロック射影ラインメモリ27に保存される前フレームに係る第2の垂直方向ブロック射影データの波形と、第2の垂直方向ブロック射影データ最大値保存部28で算出された第1の閾値とが交差する点を求め、この交差点(以下では「第1の閾値交差点」ともいう)の情報を出力する。   The first threshold value intersection search unit 29 calculates the waveform of the second vertical block projection data related to the previous frame stored in the second vertical block projection line memory 27 and the second vertical block projection data maximum value. A point where the first threshold value calculated by the storage unit 28 intersects is obtained, and information on this intersection (hereinafter also referred to as “first threshold value intersection”) is output.

垂直方向ブロック射影データ読み出し部30は、第1の閾値交差点探索部29で求められた第1の閾値交差点を中心に、その前後の所定範囲(動きベクトル検出範囲)内にある第1の垂直方向ブロック射影データを、第1の垂直方向ブロック射影ラインメモリ26から読み出す。   The vertical block projection data reading unit 30 has a first vertical direction within a predetermined range (motion vector detection range) before and after the first threshold intersection obtained by the first threshold intersection search unit 29. The block projection data is read from the first vertical block projection line memory 26.

垂直方向ブロック水平方向動きベクトル算出部31は、第1の垂直方向ブロック射影データ最大値保存部24から出力される第2の閾値を用い、垂直方向ブロック射影データ読み出し部30で読み出された第1の垂直方向ブロック射影データそれぞれをn値化(nは2以上の整数)してビット数の削減を行うとともに、n値化された射影データを第1の閾値交差点からの距離毎に加算する。   The vertical block horizontal motion vector calculation unit 31 uses the second threshold output from the first vertical block projection data maximum value storage unit 24 and reads the first block read by the vertical block projection data reading unit 30. Each of the vertical block projection data of 1 is converted into n-values (n is an integer of 2 or more) to reduce the number of bits, and the n-valued projection data is added for each distance from the first threshold intersection. .

水平方向動きベクトル決定部32は、垂直方向ブロック水平方向動きベクトル算出部31からの出力に基づき画像の水平方向動きベクトルを決定する。ここで決定された画像の水平方向動きベクトルは出力端子33から出力される。   The horizontal motion vector determination unit 32 determines the horizontal motion vector of the image based on the output from the vertical block horizontal motion vector calculation unit 31. The horizontal motion vector of the image determined here is output from the output terminal 33.

図4は、垂直方向ブロック射影部23の要部構成を示すブロック図である。
垂直方向ブロック射影部23は、入力端子231と、1水平ラインずつデータ加算を行う加算器232と、加算器232で加算されたデータを逐次保存するバッファメモリとしての垂直方向射影一時記憶メモリ233と、出力端子234とを備えている。
FIG. 4 is a block diagram showing a main configuration of the vertical block projection unit 23.
The vertical block projection unit 23 includes an input terminal 231, an adder 232 that performs data addition for each horizontal line, and a vertical projection temporary storage memory 233 as a buffer memory that sequentially stores data added by the adder 232. And an output terminal 234.

入力端子231には、垂直方向エッジ抽出フィルタリング部22で垂直方向のエッジが強調された画像が垂直方向ブロック毎に入力される。入力端子231に入力された画像は、垂直方向ブロック毎に加算器232および垂直方向射影一時記憶メモリ233によって垂直方向に射影がとられる。具体的には、加算器232において垂直方向ブロックの1水平ライン分のデータと、垂直方向射影一時メモリ233から読み出された1水平ライン分のデータとが加算され、加算結果が垂直方向射影一時記憶メモリ233に再び戻されて記憶される。このような加算動作が繰り返されることにより垂直方向ブロックにおける全ての水平ラインの加算が終了すると、全水平ラインの加算データ、つまり垂直方向の射影データが出力端子234から出力されることとなる。   An image whose vertical edges are emphasized by the vertical edge extraction filtering unit 22 is input to the input terminal 231 for each vertical block. The image input to the input terminal 231 is projected in the vertical direction by the adder 232 and the vertical projection temporary storage memory 233 for each vertical block. Specifically, the adder 232 adds the data for one horizontal line of the vertical block and the data for one horizontal line read from the vertical projection temporary memory 233, and the addition result is the vertical projection temporary. It is returned again to the storage memory 233 and stored. When the addition of all the horizontal lines in the vertical block is completed by repeating such an addition operation, the addition data of all the horizontal lines, that is, the projection data in the vertical direction is output from the output terminal 234.

図5は、垂直方向ブロック水平方向動きベクトル算出部31の要部構成を示すブロック図である。   FIG. 5 is a block diagram illustrating a main configuration of the vertical block horizontal motion vector calculation unit 31.

垂直方向ブロック水平方向動きベクトル算出部31は、3つの入力端子311〜313と、n値化器314と、n値化器314でn値化された第1の垂直方向ブロック射影データの加算を行う加算器315と、加算器315で加算されたデータを逐次保存するバッファメモリとしての水平方向動きベクトル加算メモリ316と、ピーク検出器317と、出力端子318とを備えている。   The vertical block horizontal motion vector calculation unit 31 adds three input terminals 311 to 313, an n-value calculator 314, and the first vertical block projection data converted to n-value by the n-value generator 314. An adder 315 to perform, a horizontal motion vector addition memory 316 as a buffer memory for sequentially storing data added by the adder 315, a peak detector 317, and an output terminal 318 are provided.

入力端子311には、垂直方向ブロック射影データ読み出し部30から出力された第1の垂直方向ブロック射影データが入力され、入力端子312には、第1の垂直方向ブロック射影データ最大値保存部24から出力された第2の閾値が入力される。また、入力端子313には、第1の閾値交差点探索部29から出力された第1の閾値交差点の情報が入力される。   The first vertical block projection data output from the vertical block projection data reading unit 30 is input to the input terminal 311, and the first vertical block projection data maximum value storage unit 24 is input to the input terminal 312. The output second threshold value is input. In addition, the first threshold value intersection information output from the first threshold value intersection search unit 29 is input to the input terminal 313.

n値化器314は、入力端子311から入力された第1の垂直方向ブロック射影データを、入力端子312から入力される第2の閾値に基づいてn値化(例えば3値化)する。   The n-value converter 314 converts the first vertical block projection data input from the input terminal 311 into n-values (for example, ternarization) based on the second threshold value input from the input terminal 312.

加算器315は、n値化器314でn値化された第1の垂直方向ブロック射影データと、水平方向動きベクトル加算メモリ316から読み出されたデータとを第1の閾値交差点を中心として加算し、加算結果を水平方向動きベクトル加算メモリ316に再び記憶させる。このような加算動作が繰り返されることにより垂直方向ブロックに関する全ての第1の閾値交差点についての加算が終了すると、垂直方向ブロックに関する加算データがピーク検出器317に出力される。   The adder 315 adds the first vertical block projection data n-valued by the n-value calculator 314 and the data read from the horizontal motion vector addition memory 316 around the first threshold intersection. Then, the addition result is stored in the horizontal motion vector addition memory 316 again. When the addition for all the first threshold intersections related to the vertical block is completed by repeating such an addition operation, the addition data related to the vertical block is output to the peak detector 317.

ピーク検出器317は、加算器315から出力された加算データにおけるピーク位置(後述する水平方向動きベクトル)を検出する。このピーク検出器317で検出されたピーク位置は、出力端子318を介して水平方向動きベクトル決定部32に入力されることとなる。   The peak detector 317 detects a peak position (horizontal motion vector described later) in the added data output from the adder 315. The peak position detected by the peak detector 317 is input to the horizontal direction motion vector determination unit 32 via the output terminal 318.

次に、垂直方向動きベクトル検出部4の構成を説明する。
図6は、垂直方向動きベクトル検出部4の要部構成を示すブロック図である。
Next, the configuration of the vertical motion vector detection unit 4 will be described.
FIG. 6 is a block diagram showing a main configuration of the vertical motion vector detection unit 4.

垂直方向動きベクトル検出部4は、入力端子40と、水平方向画像分割部41と、水平方向エッジ抽出フィルタリング部42と、水平方向ブロック射影部43と、第1の水平方向ブロック射影ラインメモリ44と、第1の水平方向ブロック射影データ最大値保存部45と、水平方向ブロック射影データ平滑化部53とを備えている。また、垂直方向動きベクトル検出部4は、第2の水平方向ブロック射影ラインメモリ46と、第2の水平方向ブロック射影データ最大値保存部47と、第3の閾値交差点探索部48と、水平方向ブロック射影データ読み出し部49と、水平方向ブロック垂直方向動きベクトル算出部50と、垂直方向動きベクトル決定部51と、出力端子52とを備えている。以上の垂直方向動きベクトル検出部4の各部位について、その機能を簡単に説明する(具体的な動作は後で詳述する)。   The vertical motion vector detection unit 4 includes an input terminal 40, a horizontal image segmentation unit 41, a horizontal edge extraction filtering unit 42, a horizontal block projection unit 43, and a first horizontal block projection line memory 44. The first horizontal block projection data maximum value storage unit 45 and the horizontal block projection data smoothing unit 53 are provided. The vertical motion vector detection unit 4 includes a second horizontal block projection line memory 46, a second horizontal block projection data maximum value storage unit 47, a third threshold intersection search unit 48, and a horizontal direction. A block projection data reading unit 49, a horizontal block vertical motion vector calculation unit 50, a vertical motion vector determination unit 51, and an output terminal 52 are provided. The function of each part of the above-described vertical motion vector detection unit 4 will be briefly described (specific operations will be described in detail later).

水平方向画像分割部41は、入力端子40に入力されたフレーム画像を水平方向に分割し、水平方向に分割したブロック(以下では「水平方向ブロック」とも称する)を出力する。   The horizontal image dividing unit 41 divides the frame image input to the input terminal 40 in the horizontal direction and outputs a block divided in the horizontal direction (hereinafter also referred to as “horizontal block”).

水平方向エッジ抽出フィルタリング部42は、水平方向画像分割部41で分割されたブロック毎にエッジ抽出を行うためのフィルタリング処理を行う。   The horizontal direction edge extraction filtering unit 42 performs a filtering process for performing edge extraction for each block divided by the horizontal direction image dividing unit 41.

水平方向ブロック射影部43は、水平方向エッジ抽出フィルタリング部42から出力されるエッジ強調済みの水平方向ブロックについて水平方向に射影をとり、水平方向ブロック毎に射影データを出力する。   The horizontal block projection unit 43 projects the edge-enhanced horizontal block output from the horizontal edge extraction filtering unit 42 in the horizontal direction and outputs projection data for each horizontal block.

第1の水平方向ブロック射影ラインメモリ44は、水平方向ブロック射影部43から出力された水平方向ブロックの射影データを、現フレームの水平方向ブロック射影データ(以下では「第1の水平方向ブロック射影データ」ともいう)として保存する。   The first horizontal block projection line memory 44 converts the horizontal block projection data output from the horizontal block projection unit 43 into the horizontal block projection data of the current frame (hereinafter referred to as “first horizontal block projection data”). As “)”.

水平方向ブロック射影データ平滑化部53は、第1の水平方向ブロック射影ラインメモリ44に保存された水平方向ブロック射影データを読み出し、水平方向ブロック射影データに重畳されている変動ノイズを除去し、平滑化した射影データ(以下では、平滑化射影データと記す)を第1の水平方向ブロック射影ラインメモリ44に書き戻す。従って、以降の処理における「射影データ」とは、特に区別して記載しない場合も含めて、「平滑化された射影データ(平滑化射影データ)」のことであり、「第1の水平方向ブロック射影データ」についても、平滑化射影データである。   The horizontal block projection data smoothing unit 53 reads the horizontal block projection data stored in the first horizontal block projection line memory 44, removes the fluctuation noise superimposed on the horizontal block projection data, and performs smoothing. The converted projection data (hereinafter referred to as smoothed projection data) is written back to the first horizontal block projection line memory 44. Accordingly, the “projection data” in the subsequent processing is “smoothed projection data (smoothed projection data)”, including the case where it is not particularly distinguished and described, and “first horizontal block projection”. “Data” is also the smoothed projection data.

第1の水平方向ブロック射影データ最大値保存部45は、水平方向ブロック射影部43から出力された現フレームの水平方向ブロックの射影データの最大値(以下では「現フレームの水平方向ブロック射影データ最大値」または「第1の水平方向ブロック射影データ最大値」とも言う)を保存する。   The first horizontal block projection data maximum value storage unit 45 outputs the maximum value of the projection data of the horizontal block of the current frame output from the horizontal block projection unit 43 (hereinafter, “maximum horizontal block projection data of the current frame”). Value ”or“ first horizontal block projection data maximum value ”).

第2の水平方向ブロック射影ラインメモリ46は、第1の水平方向ブロック射影ラインメモリ44から送られた水平方向ブロック射影データを、前フレームの水平方向ブロックの射影データ(以下では「第2の水平方向ブロック射影データ」ともいう)として保存する。   The second horizontal block projection line memory 46 converts the horizontal block projection data sent from the first horizontal block projection line memory 44 into projection data (hereinafter referred to as “second horizontal block projection data” of the horizontal block of the previous frame). It is also saved as “direction block projection data”.

第2の水平方向ブロック射影データ最大値保存部47は、第1の水平方向ブロック射影データ最大値保存部45から出力された第1の水平方向ブロック射影データ最大値を、前フレームに関する「第2の水平方向ブロック射影データ最大値」(「前フレームの水平方向ブロック射影データ最大値」とも言う)として保存する。また、第2の水平方向ブロック射影データ最大値保存部47は、第2の水平方向ブロック射影データ最大値に基づき、後述する第3の閾値および第4の閾値を算出する。   The second horizontal block projection data maximum value storage unit 47 uses the first horizontal block projection data maximum value output from the first horizontal block projection data maximum value storage unit 45 as the “second ”Horizontal direction block projection data maximum value” (also referred to as “horizontal block projection data maximum value of previous frame”). Further, the second horizontal block projection data maximum value storage unit 47 calculates a third threshold value and a fourth threshold value, which will be described later, based on the second horizontal block projection data maximum value.

第3の閾値交差点探索部48は、第2の水平方向ブロック射影ラインメモリ46に保存される前フレームに係る第2の水平方向ブロック射影データと、第2の水平方向ブロック射影データ最大値保存部47で算出された第3の閾値とが交差する点を求め、この交差点(以下では「第3の閾値交差点」ともいう)の情報を出力する。   The third threshold intersection search unit 48 includes a second horizontal block projection data related to the previous frame stored in the second horizontal block projection line memory 46, and a second horizontal block projection data maximum value storage unit. The point where the third threshold value calculated at 47 intersects is obtained, and information on this intersection (hereinafter also referred to as “third threshold value intersection”) is output.

水平方向ブロック射影データ読み出し部49は、第3の閾値交差点探索部48で求められた第3の閾値交差点を中心に、その前後の所定範囲(動きベクトル検出範囲)内にある第1の水平方向ブロック射影データを、第1の水平方向ブロック射影ラインメモリ44から読み出す。   The horizontal block projection data reading unit 49 has a first horizontal direction within a predetermined range (motion vector detection range) before and after the third threshold intersection obtained by the third threshold intersection search unit 48. Block projection data is read from the first horizontal block projection line memory 44.

水平方向ブロック垂直方向動きベクトル算出部50は、第2の水平方向ブロック射影データ最大値保存部47から出力される第4の閾値を用い、水平方向ブロック射影データ読み出し部49で読み出された第1の水平方向ブロック射影データそれぞれをn値化(nは2以上の整数)してビット数の削減を行うとともに、n値化された射影データを第3の閾値交差点からの距離毎に加算する。   The horizontal block vertical motion vector calculation unit 50 uses the fourth threshold value output from the second horizontal block projection data maximum value storage unit 47, and is read by the horizontal block projection data read unit 49. Each horizontal block projection data of 1 is converted into n-values (n is an integer of 2 or more) to reduce the number of bits, and the n-valued projection data is added for each distance from the third threshold intersection. .

垂直方向動きベクトル決定部51は、水平方向ブロック垂直方向動きベクトル算出部50からの出力に基づき画像の垂直方向動きベクトルを決定する。ここで決定された画像の垂直方向動きベクトルは出力端子52から出力される。   The vertical motion vector determination unit 51 determines the vertical motion vector of the image based on the output from the horizontal block vertical motion vector calculation unit 50. The vertical motion vector of the image determined here is output from the output terminal 52.

図7は、水平方向ブロック射影部43の要部構成を示すブロック図である。
水平方向ブロック射影部43は、入力端子431と、水平方向ブロックの1水平ラインデータの加算を行う加算器432と、加算器432で加算されたデータを逐次保存するバッファメモリとしての水平方向射影一時記憶メモリ433と、出力端子434とを備えている。
FIG. 7 is a block diagram showing a main configuration of the horizontal block projection unit 43.
The horizontal block projection unit 43 includes an input terminal 431, an adder 432 for adding one horizontal line data of the horizontal block, and a horizontal projection temporary as a buffer memory for sequentially storing the data added by the adder 432. A storage memory 433 and an output terminal 434 are provided.

入力端子431には、水平方向エッジ抽出フィルタリング部42で水平方向のエッジが強調された画像が入力される。入力端子431に入力された画像は、水平方向ブロック毎に加算器432および水平方向射影一時記憶メモリ433によって水平方向に射影がとられる。具体的には、水平方向ブロック内の1水平ラインの画素について、入力端子431から入力された画素と、前画素までに加算器432で加算され水平方向射影一時記憶メモリ433に記憶された加算結果を、加算器432で加算し、その加算結果を再び水平方向射影一時記憶メモリ433に戻し記憶する。このような加算動作が繰り返されることにより水平方向ブロックにおける1水平ラインの加算が終了すると、その水平方向ブロックの1水平ラインの全画素の加算データ、つまり水平方向の射影データが出力端子434から出力されることとなる。以下、同様にして、次の水平方向ブロックの水平方向の射影データが処理され、全ての水平方向ブロックの1水平ラインの処理が終了すると、次の1水平ラインの処理がなされる。   The input terminal 431 receives an image in which horizontal edges are emphasized by the horizontal edge extraction filtering unit 42. The image input to the input terminal 431 is projected in the horizontal direction by the adder 432 and the horizontal projection temporary storage memory 433 for each horizontal block. Specifically, with respect to the pixels of one horizontal line in the horizontal block, the addition result that is added by the adder 432 and stored in the horizontal projection temporary storage memory 433 up to the previous pixel and the pixel input from the input terminal 431. Are added by the adder 432, and the addition result is returned to the horizontal projection temporary storage memory 433 and stored. When the addition of one horizontal line in the horizontal block is completed by repeating such an addition operation, the addition data of all the pixels in one horizontal line of the horizontal block, that is, the projection data in the horizontal direction is output from the output terminal 434. Will be. Hereinafter, similarly, the projection data in the horizontal direction of the next horizontal block is processed, and when the processing of one horizontal line of all the horizontal blocks is completed, the processing of the next one horizontal line is performed.

図8は、水平方向ブロック垂直方向動きベクトル算出部50の要部構成を示すブロック図である。   FIG. 8 is a block diagram showing a main configuration of the horizontal block vertical motion vector calculation unit 50.

水平方向ブロック垂直方向動きベクトル算出部50は、3つの入力端子501〜503と、n値化器504と、n値化器504でn値化された第1の水平方向ブロック射影データの加算を行う加算器505と、加算器505で加算されたデータを逐次保存するバッファメモリとしての垂直方向動きベクトル加算メモリ506と、ピーク検出器507と、出力端子508とを備えている。   The horizontal block vertical motion vector calculation unit 50 adds three input terminals 501 to 503, an n-value converter 504, and the first horizontal block projection data converted to n-value by the n-value generator 504. An adder 505 to be performed, a vertical motion vector addition memory 506 as a buffer memory for sequentially storing data added by the adder 505, a peak detector 507, and an output terminal 508 are provided.

入力端子501には、水平方向ブロック射影データ読み出し部49から出力された第1の水平方向ブロック射影データが入力され、入力端子502には、第2の水平方向ブロック射影データ最大値保存部47から出力された第4の閾値が入力される。また、入力端子503には、第3の閾値交差点探索部48から出力された第3の閾値交差点の情報が入力される。   The first horizontal block projection data output from the horizontal block projection data reading unit 49 is input to the input terminal 501, and the second horizontal block projection data maximum value storage unit 47 is input to the input terminal 502. The output fourth threshold value is input. In addition, the information about the third threshold value intersection output from the third threshold value intersection search unit 48 is input to the input terminal 503.

n値化器504は、入力端子501から入力された第1の水平方向ブロック射影データを、入力端子502から入力される第4の閾値に基づいてn値化(例えば3値化)する。   The n-value converter 504 converts the first horizontal block projection data input from the input terminal 501 into n-values (for example, ternarization) based on the fourth threshold value input from the input terminal 502.

加算器505は、n値化器504でn値化された第1の水平方向ブロック射影データと、垂直方向動きベクトル加算メモリ506から読み出されたデータとを第3の閾値交差点を中心として加算し、加算結果を垂直方向動きベクトル加算メモリ506に再び記憶させる。このような加算動作が繰り返されることにより水平方向ブロックに関する全ての第3の閾値交差点についての加算が終了すると、水平方向ブロックに関する加算データがピーク検出器507に出力される。   The adder 505 adds the first horizontal block projection data converted to the n-value by the n-value generator 504 and the data read from the vertical motion vector addition memory 506 around the third threshold value intersection. Then, the addition result is stored in the vertical motion vector addition memory 506 again. When the addition for all the third threshold intersections regarding the horizontal block is completed by repeating such an addition operation, the addition data regarding the horizontal block is output to the peak detector 507.

ピーク検出器507は、加算器505から出力された加算データにおけるピーク位置(後述する垂直方向動きベクトル)を検出する。このピーク検出器507で検出されたピーク位置は、出力端子508を介して垂直方向動きベクトル決定部51に入力されることとなる。   The peak detector 507 detects a peak position (vertical motion vector described later) in the added data output from the adder 505. The peak position detected by the peak detector 507 is input to the vertical direction motion vector determination unit 51 via the output terminal 508.

以上のような構成を有する動きベクトル検出装置1の動作について、以下で説明する。   The operation of the motion vector detection apparatus 1 having the above configuration will be described below.

<動きベクトル検出装置1の動作>
<水平方向動きベクトル検出部2の動作>
まず、動きベクトル検出装置1において画像の水平方向の動きベクトルを検出する水平方向動きベクトル検出部2の動作を説明する。
<Operation of Motion Vector Detection Device 1>
<Operation of Horizontal Motion Vector Detection Unit 2>
First, the operation of the horizontal motion vector detection unit 2 that detects the horizontal motion vector of an image in the motion vector detection device 1 will be described.

図2のように水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像が、図3に示す水平方向動きベクトル検出部2の入力端子20に入力されると、垂直方向画像分割部21で垂直方向にブロック分割される。すなわち、垂直方向画像分割部21においては、フレーム画像において垂直方向に分割して得られる複数の画像領域(垂直方向ブロック)が設定される。これにより、以降の処理では、垂直方向ブロック毎に処理および管理が行われることとなる。   As shown in FIG. 2, when a frame image read out by sequentially repeating pixel scanning of the horizontal line in the vertical direction is input to the input terminal 20 of the horizontal direction motion vector detecting unit 2 shown in FIG. 21 is divided into blocks in the vertical direction. That is, in the vertical image dividing unit 21, a plurality of image regions (vertical blocks) obtained by dividing the frame image in the vertical direction are set. Thereby, in the subsequent processing, processing and management are performed for each vertical block.

垂直方向画像分割部21では、例えば図9(a)に示すように640画素×480画素の画像データが、垂直方向に64画素の幅(分割幅)を有した7個の垂直方向ブロックvb0〜vb6に分割される。なお、垂直方向の最下段の画像データvb7は水平方向動きベクトルの検出において利用されないこととなるが、フレーム画像の大部分を占める7つの垂直方向ブロックvb0〜vb6が水平方向動きベクトルの検出に使用されるため、検出精度の面で特に問題はないと考えられる。ここで、図9(a)に示す分割幅および分割数とするのは必須ではない。   In the vertical image division unit 21, for example, as shown in FIG. 9A, image data of 640 pixels × 480 pixels is converted into seven vertical blocks vb0 to vb0 having a width of 64 pixels (division width) in the vertical direction. Divided into vb6. Although the image data vb7 at the lowest stage in the vertical direction is not used in the detection of the horizontal motion vector, the seven vertical blocks vb0 to vb6 occupying most of the frame image are used for the detection of the horizontal motion vector. Therefore, it is considered that there is no particular problem in terms of detection accuracy. Here, it is not essential to use the division width and the number of divisions shown in FIG.

垂直方向画像分割部21で図9(a)のように7個の垂直方向ブロックvb0〜vb6に分割された画像は、垂直方向エッジ抽出フィルタリング部22において垂直方向に延びるエッジ成分の抽出、換言すれば水平方向に急峻に変化する画像部分を強調するようなフィルタリング処理が施される。   The image divided by the vertical image dividing unit 21 into seven vertical blocks vb0 to vb6 as shown in FIG. 9A is extracted, in other words, edge components extending in the vertical direction by the vertical edge extraction filtering unit 22. For example, a filtering process for emphasizing an image portion that changes sharply in the horizontal direction is performed.

このフィルタリング処理で用いられるフィルタとしては、単純に水平方向に隣接する画素との差分を取る(1,−1)の2タップフィルタや、2次微分に相当する(−1,2,−1)の3タップフィルタなどの使用が可能である。なお、このようなフィルタを使用するのは必須でなく、水平方向に輝度変化が大きくなる画像部分において出力値が上昇するフィルタであれば良い。   As a filter used in this filtering processing, a (1, -1,) 2-tap filter that simply takes a difference from a pixel adjacent in the horizontal direction, or (-1, 2, -1) corresponding to a second order differential. It is possible to use a 3-tap filter. Note that it is not essential to use such a filter, and any filter may be used as long as the output value increases in an image portion where the luminance change in the horizontal direction increases.

垂直方向エッジ抽出フィルタリング部22で各垂直方向ブロック(画像領域)vb0〜vb6毎に垂直方向のエッジが強調された画像データは、垂直方向ブロック射影部23に入力され、垂直方向ブロック射影部23で垂直方向に射影される。この射影により、垂直方向の(ライン間で)ノイズ成分を低減でき、また垂直方向のエッジ成分をより強調できるため、特徴点に対応する垂直方向エッジを際立たせて動きベクトル検出精度の向上を図れることとなる。垂直方向ブロック射影部23の動作について、図9(b)の概念図を参照しつつ説明する。   The image data in which the vertical edge is emphasized for each vertical block (image region) vb0 to vb6 by the vertical edge extraction filtering unit 22 is input to the vertical block projection unit 23, and the vertical block projection unit 23 Projected vertically. This projection can reduce the noise component in the vertical direction (between lines) and can enhance the edge component in the vertical direction, so that the vertical edge corresponding to the feature point can be emphasized to improve the motion vector detection accuracy. It will be. The operation of the vertical block projection unit 23 will be described with reference to the conceptual diagram of FIG.

垂直方向ブロック射影部23では、図9(a)に示す各垂直方向ブロックvb0〜vb6の入力が完了した時点、つまりエッジ強調された各垂直方向ブロックvb0〜vb6における最終ラインの最終画素が入力された時点で、1水平ライン分のデータ配列Mvを有する垂直方向ブロック射影データvn0〜vn6(図9(b))それぞれの全配列要素が生成される。なお、データ配列Mvは、水平ラインの全画素数(例えば640)の配列要素を有しているが、(1,−1)のような2タップフィルタでは有効要素が水平ラインの全画素数−1(例えば639)、(−1,2,−1)のような3タップフィルタでは有効要素が水平ラインの全画素数−2(例えば638)となる。   In the vertical block projection unit 23, when the input of the vertical blocks vb0 to vb6 shown in FIG. 9A is completed, that is, the final pixels of the final line in the vertical blocks vb0 to vb6 with edge enhancement are input. At this point, all array elements of the vertical direction block projection data vn0 to vn6 (FIG. 9B) having the data array Mv for one horizontal line are generated. The data array Mv has array elements of the total number of pixels on the horizontal line (for example, 640). However, in a 2-tap filter such as (1, -1), the effective element is the total number of pixels of the horizontal line − In a 3-tap filter such as 1 (for example, 639) and (−1, 2, −1), the effective elements are the total number of pixels in the horizontal line−2 (for example, 638).

具体的には、図4に示すように入力端子231を介して入力された各垂直方向ブロックvb0〜vb6の画像データ(垂直方向のエッジ強調が施された画像データ)が、順次に加算器232に入力される。   Specifically, as shown in FIG. 4, the image data of the vertical blocks vb0 to vb6 (image data subjected to vertical edge emphasis) input via the input terminal 231 are sequentially added to the adder 232. Is input.

加算器232では、まず入力された垂直方向ブロックの先頭の水平ラインが、垂直方向射影一時記憶メモリ233内のデータを読み出すことなく、垂直方向射影一時記憶メモリ233に書き込まれる。次に、加算器232では、垂直方向射影一時記憶メモリ233に記憶されている前ラインまでの加算結果を読み出し、入力端子231から入力される垂直方向ブロックの水平1ラインとの加算を行って、その加算結果を垂直方向射影一時記憶メモリ233に書き戻す。   In the adder 232, first, the first horizontal line of the input vertical block is written into the vertical projection temporary storage memory 233 without reading the data in the vertical projection temporary storage memory 233. Next, the adder 232 reads the addition result up to the previous line stored in the vertical projection temporary storage memory 233, performs addition with the horizontal one line of the vertical block input from the input terminal 231, and The addition result is written back to the vertical projection temporary storage memory 233.

そして、垂直方向ブロックにおける最終の水平ラインが加算器232に入力されると、垂直方向射影一時記憶メモリ233に保存された前ラインまでの加算結果を読み出し、入力端子231から入力される垂直方向ブロックの最終ラインとの加算を行って、その加算結果、つまり垂直方向ブロックの全ての水平ラインが加算されたデータを垂直方向ブロックの射影データとして、出力端子234から第1の垂直方向ブロック射影データ最大値保存部24とビット数削減部25とに出力する。   When the final horizontal line in the vertical block is input to the adder 232, the addition result up to the previous line stored in the vertical projection temporary storage memory 233 is read and the vertical block input from the input terminal 231 is read. And the addition result, that is, the data obtained by adding all the horizontal lines of the vertical block is used as projection data of the vertical block, and the first vertical block projection data maximum from the output terminal 234 is obtained. The data is output to the value storage unit 24 and the bit number reduction unit 25.

なお、加算器232において垂直方向ブロックの全水平ラインが加算された射影データを垂直方向射影一時記憶メモリ233に一旦記憶させ、次の垂直方向ブロックの先頭ラインが入力される際に、垂直方向射影一時記憶メモリ233内の射影データを読み出して出力端子234から出力するようにしても良い。   The adder 232 temporarily stores the projection data obtained by adding all the horizontal lines of the vertical block in the vertical projection temporary storage memory 233, and when the first line of the next vertical block is input, the vertical projection is performed. The projection data in the temporary storage memory 233 may be read and output from the output terminal 234.

第1の垂直方向ブロック射影データ最大値保存部24では、垂直方向ブロック射影部23から出力された垂直方向ブロックの射影データに関する最大値を算出し、第1の垂直方向ブロック射影データ最大値(現フレームの垂直方向ブロック射影データ最大値)として保存する。すなわち、第1の垂直方向ブロック射影データ最大値保存部24は、現フレーム(後フレーム)の射影データに関するデータ配列Mv(図9(b))の配列要素において最大値を求め、この最大値を記憶する。   The first vertical block projection data maximum value storage unit 24 calculates the maximum value regarding the projection data of the vertical block output from the vertical block projection unit 23, and the first vertical block projection data maximum value (current Frame vertical block projection data maximum value). That is, the first vertical block projection data maximum value storage unit 24 obtains the maximum value in the array element of the data array Mv (FIG. 9B) relating to the projection data of the current frame (subsequent frame), and calculates this maximum value. Remember.

また、第1の垂直方向ブロック射影データ最大値保存部24では、算出された現フレームの垂直方向ブロック射影データ最大値に基づき、第2の閾値を算出する。例えば、現フレームの垂直方向ブロック射影データ最大値をP1maxとすると、第2の閾値α2は次の式(1)で算出される。   Further, the first vertical block projection data maximum value storage unit 24 calculates the second threshold value based on the calculated vertical block projection data maximum value of the current frame. For example, if the maximum value of the vertical direction block projection data of the current frame is P1max, the second threshold value α2 is calculated by the following equation (1).

α2=P1max×k1・・・・・・・・(1)
ここで、k1は予め定められた係数で、0<k1<1である。
α2 = P1max × k1 (1)
Here, k1 is a predetermined coefficient, and 0 <k1 <1.

なお、第2の閾値α2の演算は、上式(1)に限るものではなく、現フレームの垂直方向ブロック射影データ最大値P1maxが大きくなれば第2の閾値α2が大きくなるものであれば良く、また変換テーブルを使用しても良い。   Note that the calculation of the second threshold value α2 is not limited to the above equation (1), and it is sufficient that the second threshold value α2 increases as the vertical block projection data maximum value P1max of the current frame increases. Alternatively, a conversion table may be used.

ビット数削減部25では、第1の垂直方向ブロック射影データ最大値保存部24から入力された現フレームの垂直方向ブロック射影データ最大値(第1の垂直方向ブロック射影データ最大値)に基づき射影データの有効ビットレンジを決定する。そして、この有効ビットレンジに基づき設定される上位無効ビットおよび下位無効ビットを垂直方向ブロック射影部23から入力された垂直方向ブロック射影データから削減し、有効ビットのみで構成される現フレームの垂直方向ブロック射影データを第1の垂直方向ブロック射影ラインメモリ26に出力する。   In the bit number reduction unit 25, the projection data is based on the vertical block projection data maximum value (first vertical block projection data maximum value) of the current frame input from the first vertical block projection data maximum value storage unit 24. Determine the effective bit range of. Then, the upper invalid bit and the lower invalid bit set based on the valid bit range are reduced from the vertical block projection data input from the vertical block projection unit 23, and the vertical direction of the current frame configured only by the valid bits The block projection data is output to the first vertical block projection line memory 26.

第1の垂直方向ブロック射影ラインメモリ26は、ビット数削減部25によってビット数が低減された現フレームの垂直方向ブロック射影データを、第1の垂直方向ブロック射影データとして垂直方向ブロック毎に保存する。すなわち、第1の垂直方向ブロック射影ラインメモリ26には、第1の垂直方向ブロック射影データ最大値保存部24で求められた第1の垂直方向ブロック射影データ最大値に基づきビット数削減部25においてビット数(各配列要素のデータ長)が削減された現フレーム(後フレーム)の射影データが記憶される。   The first vertical block projection line memory 26 stores the vertical block projection data of the current frame whose number of bits has been reduced by the bit number reduction unit 25 as the first vertical block projection data for each vertical block. . That is, in the first vertical block projection line memory 26, the bit number reduction unit 25 based on the first vertical block projection data maximum value obtained by the first vertical block projection data maximum value storage unit 24. Projection data of the current frame (subsequent frame) in which the number of bits (data length of each array element) is reduced is stored.

第1の垂直方向ブロック射影ラインメモリ26に保存された垂直方向ブロック射影データは、必要なデータが揃った時点で、垂直方向ブロック射影データ平滑化部34に読み出され、平滑化処理がなされた後、第1の垂直方向ブロック射影ラインメモリ26に書き戻される。例えば、Pa、Pb、Pcという水平方向に連続する3点を使って平滑化処理を行う場合には、「必要なデータが揃った時点」とは、水平方向に3点が揃った時点ということになり、このとき、真ん中の点Pbの平滑化処理が可能ということになる。垂直方向ブロック射影データ平滑化部34における平滑化処理の詳細については、後述する。   The vertical block projection data stored in the first vertical block projection line memory 26 is read out to the vertical block projection data smoothing unit 34 when necessary data is prepared, and smoothed. Thereafter, the data is written back to the first vertical block projection line memory 26. For example, when the smoothing process is performed using three consecutive points in the horizontal direction of Pa, Pb, and Pc, “when all necessary data is collected” means when three points are aligned in the horizontal direction. At this time, it is possible to smooth the center point Pb. Details of the smoothing process in the vertical block projection data smoothing unit 34 will be described later.

第1の垂直方向ブロック射影ラインメモリ26は、現フレームに関する新たな第1の垂直方向ブロック射影データが入力されるタイミングで、前フレームの垂直方向ブロック射影データ(平滑化されたデータ)を読み出し、第2の垂直方向ブロック射影ラインメモリ27に与える。第2の垂直方向ブロック射影ラインメモリ27は、第1の垂直方向ブロック射影ラインメモリ26から読み出された前フレームの垂直方向ブロック射影データを、第2の垂直方向ブロック射影データとして保存する。   The first vertical block projection line memory 26 reads the vertical block projection data (smoothed data) of the previous frame at a timing when new first vertical block projection data relating to the current frame is input. The second vertical block projection line memory 27 is provided. The second vertical block projection line memory 27 stores the vertical block projection data of the previous frame read from the first vertical block projection line memory 26 as second vertical block projection data.

同様に、第1の垂直方向ブロック射影データ最大値保存部24は、現フレームに関する新たな第1の垂直方向ブロック射影データ最大値が更新されるタイミングで、既に保存されている第1の垂直方向ブロック射影データ最大値を読み出し、第2の垂直方向ブロック射影データ最大値保存部28に与える。第2の垂直方向ブロック射影データ最大値保存部28では、第1の垂直方向ブロック射影データ最大値保存部24から読み出された第1の垂直方向ブロック射影データ最大値が、前フレームに関する第2の垂直方向ブロック射影データ最大値(前フレームの垂直方向ブロック射影データ最大値)として保存される。   Similarly, the first vertical block projection data maximum value storage unit 24 stores the first vertical direction already stored at the timing when the new first vertical block projection data maximum value for the current frame is updated. The block projection data maximum value is read and provided to the second vertical block projection data maximum value storage unit 28. In the second vertical block projection data maximum value storage unit 28, the first vertical block projection data maximum value read from the first vertical block projection data maximum value storage unit 24 is the second vertical block projection data maximum value related to the previous frame. Is stored as the maximum vertical block projection data value (vertical block projection data maximum value of the previous frame).

換言すれば、第1の垂直方向ブロック射影データ最大値保存部24に保存された現フレームの垂直方向ブロック射影データ最大値は、次のフレームでは、第2の垂直方向ブロック射影データ最大値保存部28に前フレームの垂直方向ブロック射影データ最大値として保存されることとなる。   In other words, the vertical block projection data maximum value of the current frame stored in the first vertical block projection data maximum value storage unit 24 is the second vertical block projection data maximum value storage unit in the next frame. 28 is stored as the vertical block projection data maximum value of the previous frame.

第2の垂直方向ブロック射影データ最大値保存部28は、前フレームに関する第2の垂直方向ブロック射影データ最大値に基づき、第1の閾値(所定の一定値)が設定される。例えば、前フレームの垂直方向ブロック射影データ最大値をP2maxとすると、第1の閾値α1は次の式(2)で算出される。   The second vertical block projection data maximum value storage unit 28 sets a first threshold (predetermined constant value) based on the second vertical block projection data maximum value for the previous frame. For example, if the maximum value of vertical block projection data for the previous frame is P2max, the first threshold value α1 is calculated by the following equation (2).

α1=P2max×k2・・・・・・・・(2)
ここで、k2は予め定められた係数で、0<k2<1である。
α1 = P2max × k2 (2)
Here, k2 is a predetermined coefficient, and 0 <k2 <1.

なお、第1の閾値α1の演算は、上式(2)に限るものではなく、前フレームの垂直方向ブロック射影データ最大値P2maxが大きくなれば第1の閾値α1が大きくなるものであれば良く、また変換テーブルを使用しても良い。   Note that the calculation of the first threshold value α1 is not limited to the above equation (2), and it is sufficient if the first threshold value α1 increases as the vertical block projection data maximum value P2max of the previous frame increases. Alternatively, a conversion table may be used.

第1の閾値交差点探索部29では、第2の垂直方向ブロック射影ラインメモリ27から読み出された第2の垂直方向ブロック射影データと、第2の垂直方向ブロック射影データ最大値保存部28から出力された第1の閾値との交差点(第1の閾値交差点)を水平方向に探索する。この第1の閾値交差点探索部29で得られた第1の閾値交差点の情報は、垂直方向ブロック射影データ読み出し部30と垂直方向ブロック水平方向動きベクトル算出部31とに出力される。   The first threshold intersection search unit 29 outputs the second vertical block projection data read from the second vertical block projection line memory 27 and the second vertical block projection data maximum value storage unit 28. An intersection with the first threshold value (first threshold value intersection) is searched in the horizontal direction. The information on the first threshold intersection obtained by the first threshold intersection searching unit 29 is output to the vertical block projection data reading unit 30 and the vertical block horizontal motion vector calculating unit 31.

垂直方向ブロック射影データ読み出し部30は、第1の閾値交差点探索部29から出力された第1の閾値交差点を中心とした動きベクトル検出範囲に対応した現フレームの(第1の)垂直方向ブロック射影データを第1の垂直方向ブロック射影ラインメモリ26から読み出す。すなわち、第1の閾値交差点をA(i)(ただしi=1,2,・・・pで、pは検出された第1の閾値交差点の総数)とし、動きベクトル検出範囲を第1の閾値交差点を中心とした(−V)から(+V)(ただしVは正の整数)の範囲とすると、第1の垂直方向ブロック射影ラインメモリ26から読み出される射影データは、水平方向において(A(i)−V)から(A(i)+V)までの範囲にある第1の垂直方向ブロック射影データの部分データとなる。   The vertical block projection data read unit 30 outputs the (first) vertical block projection of the current frame corresponding to the motion vector detection range centered on the first threshold intersection output from the first threshold intersection search unit 29. Data is read from the first vertical block projection line memory 26. That is, the first threshold intersection is A (i) (where i = 1, 2,... P, p is the total number of detected first threshold intersections), and the motion vector detection range is the first threshold. Assuming the range from (−V) to (+ V) (where V is a positive integer) centered on the intersection, the projection data read from the first vertical block projection line memory 26 is (A (i ) −V) to (A (i) + V), which is partial data of the first vertical block projection data.

この垂直方向ブロック射影データ読み出し部30によって第1の垂直方向ブロック射影ラインメモリ26から読み出された第1の垂直方向ブロック射影データは、垂直方向ブロック水平方向動きベクトル算出部31に出力される。   The first vertical block projection data read from the first vertical block projection line memory 26 by the vertical block projection data reading unit 30 is output to the vertical block horizontal motion vector calculation unit 31.

垂直方向ブロック射影データ読み出し部30から出力された第1の垂直方向ブロック射影データは、図5に示す垂直方向ブロック水平方向動きベクトル算出部31の入力端子311を介してn値化器314に入力される。このn値化器314では、第1の垂直方向ブロック射影データ最大値保存部24から出力され、入力端子312を介して入力された第2の閾値に基づき、第1の垂直方向ブロック射影データをn値化する。すなわち、n値化器314は、垂直方向ブロック射影データ読み出し部30で抽出された現フレームの射影データに関するデータ配列Mv(図9(b))各配列要素のデータ長を、例えば3値化処理して圧縮する。このn値化器314の処理について、図10(a)〜図10(c)を参照しつつ説明する。   The first vertical block projection data output from the vertical block projection data reading unit 30 is input to the n-value converter 314 via the input terminal 311 of the vertical block horizontal motion vector calculation unit 31 shown in FIG. Is done. The n-value converter 314 outputs the first vertical block projection data based on the second threshold value output from the first vertical block projection data maximum value storage unit 24 and input via the input terminal 312. n-valued. In other words, the n-value converter 314 converts the data length of each array element related to the projection data of the current frame extracted by the vertical block projection data reading unit 30 to the data length of each array element, for example, a ternization process. And compress. The processing of the n-value converter 314 will be described with reference to FIGS. 10 (a) to 10 (c).

図10(a)〜図10(c)は、n値化器314におけるn値化処理を説明するための図である。なお、図10(a)〜図10(c)では、n=3となる3値化処理の一例を示している。   FIG. 10A to FIG. 10C are diagrams for explaining the n-value conversion processing in the n-value conversion unit 314. Note that FIGS. 10A to 10C show an example of the ternary processing in which n = 3.

n値化器314に入力される第1の垂直方向ブロック射影データをD、入力端子312を介して入力される第2の閾値をα2(α2は正の整数)とすると、n値化器314では、D<(−α2)のとき(−1)を出力し、(−α2)≦D≦α2のとき0を出力するとともに、D>α2のとき1を出力することで3値化処理が行われる。すなわち、n値化器314における3値化処理では、現フレーム(後フレーム)の射影データにおけるデータ配列Mvの配列要素の最大値に基づき設定される第2の閾値α2(α2>0)に関して、垂直方向ブロック射影データ読み出し部30で抽出された現フレームの射影データに関する配列要素の値が、(−α2)より小さい場合、(−α2)以上でα2以下の場合、およびα2より大きい場合の3段階による3値化が行われる。   If the first vertical block projection data input to the n-value converter 314 is D, and the second threshold value input via the input terminal 312 is α2 (α2 is a positive integer), the n-value generator 314 Then, when D <(− α2), (−1) is output, when (−α2) ≦ D ≦ α2, 0 is output, and when D> α2, 1 is output. Done. That is, in the ternarization process in the n-valued unit 314, regarding the second threshold value α2 (α2> 0) set based on the maximum value of the array element of the data array Mv in the projection data of the current frame (subsequent frame), 3 when the value of the array element relating to the projection data of the current frame extracted by the vertical block projection data reading unit 30 is smaller than (−α2), (−α2) or more and α2 or less, and 3 Trinization is performed in stages.

このn値化器314でのn値化処理については、垂直方向ブロック射影データ読み出し部30から出力される現フレームの第1の垂直方向ブロック射影データの部分波形が、第1の閾値交差点に対してどのような位置関係、つまりどのような傾向の波形となっているのかが重要であるため、第1の垂直方向ブロック射影データの波形において山や谷が判別できるだけのビット精度を確保すれば十分である。   With regard to the n-value conversion processing by the n-value generator 314, the partial waveform of the first vertical block projection data of the current frame output from the vertical block projection data reading unit 30 is compared with the first threshold intersection. Therefore, it is important to ensure bit accuracy that can identify peaks and valleys in the waveform of the first vertical block projection data. It is.

一方、n値化器314においてビット数の削減を行わずに、垂直方向ブロック射影データ読み出し部30から出力された第1の垂直方向ブロック射影データの値そのものを採用する場合には、第1の垂直方向ブロック射影データD>α2に対応する大きな振幅の山や、D<(−α2)に対応する大きな振幅の谷に、画像の特徴が表れる小さな振幅の山や谷が埋没してしまう恐れがあり不適切である。さらに、(−α2)≦D≦α2に対応する小さな山や谷は、ノイズの影響を受けやすく数も多いため、これに画像の特徴が表れる適度な振幅の山や谷が埋もれることとなる。   On the other hand, when the value of the first vertical block projection data output from the vertical block projection data reading unit 30 is adopted without reducing the number of bits in the n-value converter 314, the first There is a possibility that a small amplitude peak or valley corresponding to the vertical block projection data D> α2 or a small amplitude peak corresponding to D <(− α2) or a small amplitude peak corresponding to D <(− α2) may be buried. There is inappropriate. Furthermore, since the small peaks and valleys corresponding to (−α2) ≦ D ≦ α2 are easily affected by noise and have a large number, the peaks and valleys having an appropriate amplitude in which the characteristics of the image appear are buried.

よって、n値化器314では、第1の垂直方向ブロック射影データに対して適切なn値化処理を施すことにより、動きベクトルの検出精度の向上を図っている。   Therefore, the n-value generator 314 improves the motion vector detection accuracy by performing an appropriate n-value process on the first vertical block projection data.

以上で説明した第1の閾値交差点探索部29、垂直方向ブロック射影データ読み出し部30および垂直方向ブロック水平方向動きベクトル算出部31の動作について、図11(a)〜図11(c)を参照しつつ具体的に説明する。なお、図11(a)および図11(b)の横軸は、射影データのデータ配列Mv(図9(b))の配列要素の位置を示している。また、図11(a)では、第1の閾値交差点A(1)〜A(8)それぞれを丸印で表している。   The operations of the first threshold intersection searching unit 29, the vertical block projection data reading unit 30, and the vertical block horizontal motion vector calculating unit 31 described above will be described with reference to FIGS. 11 (a) to 11 (c). Specific explanation will be given. Note that the horizontal axes of FIGS. 11A and 11B indicate the positions of the array elements of the projection data array Mv (FIG. 9B). In FIG. 11A, each of the first threshold intersections A (1) to A (8) is indicated by a circle.

第1の閾値交差点探索部29では、図11(a)に示すように前フレームに関する第2の垂直方向ブロック射影データW2の波形において、第2の垂直方向ブロック射影データ最大値保存部28から出力された第1の閾値α1と交差する第1の閾値交差点A(1)〜A(8)が求められる。すなわち、第1の閾値交差点探索部29は、前フレームに対して垂直方向ブロック射影部23で得られた射影データに関して射影データのデータ配列Mv(図9(b))の要素順に配列要素の値をグラフ化した波形W2と、配列要素の値が第1の閾値(所定の一定値)α1となる一次関数の直線とが交差する各第1の閾値交差点の配列要素の位置を特定する。   The first threshold value intersection search unit 29 outputs the second vertical block projection data maximum value storage unit 28 in the waveform of the second vertical block projection data W2 for the previous frame as shown in FIG. First threshold value intersections A (1) to A (8) that intersect the first threshold value α1 thus obtained are obtained. That is, the first threshold value intersection search unit 29 relates to the projection data obtained by the vertical block projection unit 23 with respect to the previous frame, and the array element values in the order of the elements in the projection data array Mv (FIG. 9B). The position of the array element at each first threshold crossing point where the waveform W2 and the linear function line having the array element value of the first threshold value (predetermined constant value) α1 intersect is specified.

次に、垂直方向ブロック射影データ読み出し部30では、図11(a)に示す各第1の閾値交差点A(1)〜A(8)を中心とした所定の動きベクトル検出範囲について第1の垂直方向ブロック射影ラインメモリ26から現フレームの垂直方向ブロック射影データが読み出される。すなわち、垂直方向ブロック射影データ読み出し部30は、各第1の閾値交差点における射影データ(データ配列)の配列要素の位置を中心とした所定範囲のデータ配列を、垂直方向ブロック射影部23から出力されビット数削減部25によりビット数が削減された現フレーム(後フレーム)の射影データから抽出する。例えば第1の閾値交差点A(7)に関しては、図11(b)に示すように第1の閾値交差点A(7)を中心に(A(7)−V)から(A(7)+V)までの範囲(矩形の破線内の波形部分)に対応する第1の垂直方向ブロック射影データW1が読み出される。   Next, the vertical block projection data reading unit 30 performs the first vertical detection for a predetermined motion vector detection range centered on each of the first threshold intersections A (1) to A (8) shown in FIG. The vertical block projection data of the current frame is read from the direction block projection line memory 26. That is, the vertical block projection data reading unit 30 outputs from the vertical block projection unit 23 a data array in a predetermined range centered on the position of the array element of the projection data (data array) at each first threshold intersection. Extracted from the projection data of the current frame (subsequent frame) whose bit number has been reduced by the bit number reduction unit 25. For example, for the first threshold value intersection A (7), as shown in FIG. 11B, the first threshold value intersection A (7) is centered on (A (7) -V) to (A (7) + V). The first vertical block projection data W1 corresponding to the range up to (the waveform portion within the rectangular broken line) is read out.

そして、垂直方向ブロック射影データ読み出し部30によって読み出された第1の垂直方向ブロック射影データは、第1の垂直方向ブロック射影データ最大値保存部24から出力された第2の閾値α2を用いて、垂直方向ブロック水平方向動きベクトル算出部31のn値器314でn値化処理される。例えば第1の閾値交差点A(7)に関しては、図11(b)に示す第2の閾値α2および(−α2)に対する第1の垂直方向ブロック射影データW1の大小関係に基づき、第1の閾値交差点A(7)を中心に(A(7)−V)から(A(7)+V)までの範囲(矩形の破線内の波形部分)について、図11(c)のように第1の垂直方向ブロック射影データが3値化処理される。これにより、現フレームの垂直方向ブロック射影データが「−1」、「0」または「1」で表されることとなる。   Then, the first vertical block projection data read by the vertical block projection data reading unit 30 uses the second threshold value α2 output from the first vertical block projection data maximum value storage unit 24. The n-value unit 314 of the vertical block horizontal direction motion vector calculation unit 31 performs n-value processing. For example, for the first threshold intersection A (7), the first threshold is based on the magnitude relationship of the first vertical block projection data W1 with respect to the second threshold α2 and (−α2) shown in FIG. With respect to the range from (A (7) −V) to (A (7) + V) centering on the intersection A (7) (the waveform portion in the rectangular broken line), the first vertical as shown in FIG. The direction block projection data is ternarized. As a result, the vertical block projection data of the current frame is represented by “−1”, “0”, or “1”.

n値化器314では、第1の閾値交差点探索部29から出力される全ての第1の閾値交差点について、図11(c)に示すようなn値化処理が行われる。   In the n-value converter 314, n-value conversion processing as shown in FIG. 11C is performed on all the first threshold value intersections output from the first threshold value intersection search unit 29.

次に、加算器315(図5)では、入力端子313を介して第1の閾値交差点探索部29から出力された第1の閾値交差点を中心に、n値化器314でn値化された第1の垂直方向ブロック射影データと、水平方向動きベクトル加算メモリ316から読み出されたひとつ前までのn値化された第1の垂直方向ブロック射影データの加算値とを加算し、その加算結果を水平方向動きベクトル加算メモリ316に再び記憶させる。そして、第1の閾値交差点探索部29で検出された全ての第1の閾値交差点のうち最後のものに関するn値化された第1の垂直方向ブロック射影データを加算器315で加算して1つの垂直方向ブロックについての加算処理を終了する際には、その加算結果をピーク検出器317に出力するようにする。なお、加算器315での加算処理終了後に、全ての第1の閾値交差点に関する加算結果を記憶している水平方向動きベクトル加算メモリ316から、その加算結果をピーク検出部317が読み出すようにしても良い。   Next, in the adder 315 (FIG. 5), the n-value generator 314 converts the n-value into the n-value centering on the first threshold-value intersection output from the first threshold-value intersection search unit 29 via the input terminal 313. The first vertical block projection data is added to the previous n-valued first vertical block projection data read from the horizontal motion vector addition memory 316, and the addition result Are again stored in the horizontal motion vector addition memory 316. Then, the adder 315 adds the n-valued first vertical block projection data relating to the last one of all the first threshold intersections detected by the first threshold intersection search unit 29 to obtain one When the addition process for the vertical block is terminated, the addition result is output to the peak detector 317. In addition, after the addition process in the adder 315 is completed, the peak detection unit 317 may read the addition result from the horizontal motion vector addition memory 316 that stores the addition results regarding all the first threshold intersections. good.

ピーク検出器317には、第1の閾値交差点探索部29で検出された全ての第1の閾値交差点について各第1の閾値交差点を中心とした動きベクトル検出範囲(上述した±Vの範囲)に対応するn値化済みの第1の垂直方向ブロック射影データを加算したデータ(以下では「垂直方向ブロックn値化データ」ともいう)が入力されるが、この垂直方向ブロックn値化データに関するピーク値がピーク検出器317で検出される。このピーク検出器317において検出される垂直方向ブロックn値化データのピーク位置が、その垂直方向ブロックから得られる水平方向動きベクトルとなり、出力端子318を介して水平方向動き決定部32に出力される。   The peak detector 317 includes all the first threshold intersections detected by the first threshold intersection search unit 29 in a motion vector detection range (the above-described ± V range) centered on each first threshold intersection. Data obtained by adding the corresponding n-valued first vertical block projection data (hereinafter also referred to as “vertical block n-valued data”) is input. The value is detected by peak detector 317. The peak position of the vertical block n-valued data detected by the peak detector 317 becomes a horizontal motion vector obtained from the vertical block, and is output to the horizontal motion determination unit 32 via the output terminal 318. .

以上で説明した加算器315およびピーク検出部317の動作について、図12(a)および図12(b)を参照しつつ具体的に説明する。なお、図12(a)では、図11(a)に示す第1の閾値交差点A(1)〜A(8)を中心とした動きベクトル検出範囲(±Vの範囲)において第1の垂直方向ブロック射影データを3値化したものを概念的に示している。   The operations of the adder 315 and the peak detector 317 described above will be specifically described with reference to FIGS. 12 (a) and 12 (b). In FIG. 12A, in the motion vector detection range (± V range) centering on the first threshold intersections A (1) to A (8) shown in FIG. The block projection data is conceptually shown as three values.

加算器315において、図12(a)に示す第1の閾値交差点A(1)〜A(8)周辺の3値化データが順次に入力されると、これらのデータが加算され、図12(b)に示すような垂直方向ブロックn値化データが生成される。具体的には、加算器315において垂直方向ブロック射影データ読み出し部30により垂直方向ブロック射影データ(データ配列Mv(図9(b)))から抽出されn値器314でデータ長が圧縮された現フレームに係る動きベクトル検出範囲(所定範囲)のデータ配列それぞれについて、各第1の閾値交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値が加算されることとなる。   In the adder 315, when ternary data around the first threshold intersections A (1) to A (8) shown in FIG. 12 (a) are sequentially input, these data are added, and FIG. Vertical block n-valued data as shown in b) is generated. Specifically, in the adder 315, the vertical block projection data reading unit 30 extracts the vertical block projection data (data array Mv (FIG. 9B)) and the n-value unit 314 compresses the data length. For each data array of the motion vector detection range (predetermined range) related to the frame, values of array elements having the same relative position with respect to the position of the array element at each first threshold intersection are added.

加算器315で生成された垂直方向ブロックn値化データがピーク検出器317に入力されると、その垂直方向ブロックの水平方向動きベクトルとして図12(b)に示す水平方向のピーク位置hvが検出される。すなわち、ピーク検出器317では、加算器315で加算された加算結果に基づき、フレーム画像の水平方向に関する動きベクトルが検出される。   When the vertical block n-valued data generated by the adder 315 is input to the peak detector 317, the horizontal peak position hv shown in FIG. 12B is detected as the horizontal motion vector of the vertical block. Is done. That is, the peak detector 317 detects a motion vector in the horizontal direction of the frame image based on the addition result added by the adder 315.

次に、垂直方向ブロック射影データ平滑化部34における平滑化処理について、図16〜図19を用いて詳細に説明する。第1の垂直方向ブロック射影ラインメモリ26に保存された垂直方向ブロック射影データは、垂直方向ブロック射影データ平滑化部34に読み出され、平滑化処理がなされた後、第1の垂直方向ブロック射影ラインメモリ26に書き戻される。図16〜図19においては、Pa、Pb、Pcという水平方向に連続する3点の配列要素を使って、平滑化処理を行う例を説明する。なお、a、b、cは、それぞれ、点Pa、Pb、Pcでの値である。   Next, the smoothing process in the vertical direction block projection data smoothing unit 34 will be described in detail with reference to FIGS. The vertical block projection data stored in the first vertical block projection line memory 26 is read out to the vertical block projection data smoothing unit 34 and subjected to smoothing processing, and then the first vertical block projection is performed. It is written back to the line memory 26. 16 to 19, an example in which smoothing processing is performed using three horizontal array elements Pa, Pb, and Pc in the horizontal direction will be described. Note that a, b, and c are values at points Pa, Pb, and Pc, respectively.

図16は、射影データの変動パターンが「下に凸で、a>0、b≧0、c>0」の場合の平滑化処理を示している。   FIG. 16 shows a smoothing process when the variation pattern of the projection data is “convex downward, a> 0, b ≧ 0, c> 0”.

動きベクトルの検出には、射影データにおいて連続する複数の点による漸増、漸減が重要であり、少数の点による凹凸は閾値との関係により精度を落とす原因となるため、除去することが望ましい。従って、図16に示すパターンでは、中心の点Pbの値bを値aと値cとの平均値に変更することで、下に凸となった形状を解消する。   For detection of motion vectors, it is important to gradually increase and decrease by a plurality of consecutive points in the projection data, and unevenness due to a small number of points causes a drop in accuracy due to the relationship with the threshold value, so it is desirable to remove them. Therefore, in the pattern shown in FIG. 16, the downwardly convex shape is eliminated by changing the value b of the central point Pb to the average value of the values a and c.

同様に、図17は、射影データの変動パターンが「上に凸で、a<0、b≦0、c<0」の場合の平滑化処理を示している。この場合にも、中心の点Pbの値bを値aと値cとの平均値に変更することで、上に凸となった形状を解消する。   Similarly, FIG. 17 shows a smoothing process when the variation pattern of the projection data is “convex upward, a <0, b ≦ 0, c <0”. Also in this case, by changing the value b of the center point Pb to the average value of the values a and c, the shape that is convex upward is eliminated.

一方、図18は、射影データの変動パターンが「下に凸で、a>0、b<0、c>0」の場合の平滑化処理を示している。   On the other hand, FIG. 18 shows a smoothing process when the variation pattern of the projection data is “convex downward, a> 0, b <0, c> 0”.

この場合、b<−α2であり、このまま処理を進めると、値bは、n値化器314によるn値化処理(本例では3値化)の際に、第2の閾値−α2に基づいて−1とされ、前後の点Pa、Pcの値が1となった場合には、Pa、Pb、Pcの各点の値が、1、−1、1となって振動してしまう。それが、加算器315において、各第1の閾値交差点を中心に加算されることにより大きな振動(振幅)となり、本来、動きベクトル位置を指し示す位置に1つの大きなピークが立つべきところが、この振動により、本来のピーク位置でない部分においても大きな値を示すことになる。   In this case, b <−α2, and if the processing proceeds as it is, the value b is based on the second threshold value −α2 during the n-value conversion processing (in this example, ternarization) by the n-value converter 314. When the values of the front and rear points Pa and Pc are 1, the values of the points Pa, Pb, and Pc are 1, -1, 1 and vibrate. In the adder 315, a large vibration (amplitude) is generated by adding each of the first threshold intersections as a center. Originally, one large peak should appear at the position indicating the motion vector position. A large value is also shown in a portion other than the original peak position.

しかし、図18に示す変動パターンに対しても図16あるいは図17と同様の平滑化処理を実行すると、射影データの特徴をn値化処理に正確に反映できなくなるという問題がある。   However, when the smoothing process similar to that shown in FIG. 16 or 17 is executed for the variation pattern shown in FIG. 18, there is a problem that the feature of the projection data cannot be accurately reflected in the n-value conversion process.

すなわち、図18に示すように、点Pbの値bが第2の閾値−α2より小さく、点Paおよび点Pcの値が0より大きくなるような大きな変動を示す場合、点Paは、点Paより前の点Pq、Pr、・・・(・・・<Pr<Pq<Pa)により構成される前段の変動パターンの一部を構成し、点Pbも前段の変動パターンを構成することが考えられる。   That is, as shown in FIG. 18, when the value b of the point Pb is smaller than the second threshold value −α2 and the point Pa and the value of the point Pc are larger than 0, the point Pa is the point Pa It is considered that a part of the former fluctuation pattern constituted by the earlier points Pq, Pr,... (<Pr <Pq <Pa) is constituted and the point Pb also constitutes the former fluctuation pattern. It is done.

また、点Pcは、点Pcより後の点Ps、Pt、・・・(Pc<Ps<Pt<・・・)により構成される後段の変動パターンの一部を構成し、点Pbも後段の変動パターンを構成することが考えられる。   Further, the point Pc constitutes a part of the subsequent fluctuation pattern constituted by the points Ps, Pt,... (Pc <Ps <Pt <...) After the point Pc, and the point Pb is also in the subsequent stage. It is conceivable to construct a variation pattern.

このような場合に、点Pbの値bを単純に値aと値cの平均値にする平滑化処理を行うと、前段の変動パターンおよび後段の変動パターンの特徴が改変されてしまうことになり、両パターンの特徴をn値化処理に正確に反映できなくなる。   In such a case, if the smoothing process is performed in which the value b of the point Pb is simply set to the average value of the value a and the value c, the characteristics of the fluctuation pattern in the preceding stage and the fluctuation pattern in the subsequent stage are modified. Thus, the features of both patterns cannot be accurately reflected in the n-value conversion process.

そこで、図18に示すような変動パターンにおいては、点Pbの値bを、n値化処理を施した場合に「0」に圧縮される値(−β)に変更するという平滑化処理を行う。ここで、「0」に圧縮される値を被圧縮値と呼称し、当該被圧縮値は、第2の閾値−α2よりも大きく、0以下の固定された値に設定する。この処理により、前段の変動パターンおよび後段の変動パターンの特徴を損なうことなく、両パターンの特徴をn値化処理に正確に反映することが可能となる。   Therefore, in the variation pattern as shown in FIG. 18, a smoothing process is performed in which the value b of the point Pb is changed to a value (−β) that is compressed to “0” when the n-value conversion process is performed. . Here, a value compressed to “0” is referred to as a compressed value, and the compressed value is set to a fixed value that is greater than the second threshold value −α2 and equal to or less than 0. By this processing, it is possible to accurately reflect the features of both patterns in the n-value conversion processing without impairing the features of the preceding and following variation patterns.

図19は、射影データの変動パターンが「上に凸で、a<0、b>0、c<0」の場合の平滑化処理を示している。   FIG. 19 shows the smoothing process when the variation pattern of the projection data is “convex upward, a <0, b> 0, c <0”.

この場合、b>α2であり、このまま処理を進めると、値bはn値化器314によるn値化処理(本例では3値化)の際に、第2の閾値α2に基づいて1とされ、前後の点Pa、Pcの値が−1となった場合には、Pa、Pb、Pcの各点の値が、−1、1、−1となって振動してしまう。それが、加算器315において、各第1の閾値交差点を中心に加算されることにより大きな振動(振幅)となり、本来、動きベクトル位置を指し示す位置に1つの大きなピークが立つべきところが、この振動により、本来のピーク位置でない部分においても大きな値を示すことになる。   In this case, b> α2, and if the processing proceeds as it is, the value b is set to 1 based on the second threshold value α2 during the n-value conversion processing (in this example, ternarization) by the n-value converter 314. When the values of the front and rear points Pa and Pc are -1, the values of the points Pa, Pb, and Pc become -1, 1, -1, and vibrate. In the adder 315, a large vibration (amplitude) is generated by adding each of the first threshold intersections as a center. Originally, one large peak should appear at the position indicating the motion vector position. A large value is also shown in a portion other than the original peak position.

しかし、図19に示す変動パターンに対しても図16あるいは図17と同様の平滑化処理を実行すると、射影データの特徴をn値化処理に正確に反映できなくなるという問題がある。   However, when the smoothing process similar to that shown in FIG. 16 or 17 is executed for the variation pattern shown in FIG.

すなわち、図19に示すように、点Pbの値bが第2の閾値α2より大きく、点Paおよび点Pcの値が0より小さくなるような大きな変動を示す場合、点Paは、点Paより前の点Pq、Pr、・・・(・・・<Pr<Pq<Pa)により構成される前段の変動パターンの一部を構成し、点Pbも前段の変動パターンを構成することが考えられる。   That is, as shown in FIG. 19, when the value b of the point Pb is larger than the second threshold value α2 and the values of the points Pa and Pc are smaller than 0, the point Pa is larger than the point Pa. It is conceivable that a part of the former fluctuation pattern constituted by the previous points Pq, Pr,... (. .

また、点Pcは、点Pcより後の点Ps、Pt、・・・(Pc<Ps<Pt<・・・)により構成される後段の変動パターンの一部を構成し、点Pbも後段の変動パターンを構成することが考えられる。   Further, the point Pc constitutes a part of the subsequent fluctuation pattern constituted by the points Ps, Pt,... (Pc <Ps <Pt <...) After the point Pc, and the point Pb is also in the subsequent stage. It is conceivable to construct a variation pattern.

このような場合に、点Pbの値bを単純に値aと値cの平均値にする平滑化処理を行うと、前段の変動パターンおよび後段の変動パターンの特徴が改変されてしまうことになり、両パターンの特徴をn値化処理に正確に反映できなくなる。   In such a case, if the smoothing process is performed in which the value b of the point Pb is simply set to the average value of the value a and the value c, the characteristics of the fluctuation pattern in the preceding stage and the fluctuation pattern in the subsequent stage are modified. Thus, the features of both patterns cannot be accurately reflected in the n-value conversion process.

そこで、図19に示すような変動パターンにおいては、点Pbの値bを、n値化処理を施した場合に「0」に圧縮される値(β)に変更するという平滑化処理を行う。ここで、「0」に圧縮される値を被圧縮値と呼称し、当該被圧縮値は、第2の閾値α2よりも小さく、0以上の固定された値に設定する。この処理により、前段の変動パターンおよび後段の変動パターンの特徴を損なうことなく、両パターンの特徴をn値化処理に正確に反映することが可能となる。   Therefore, in the variation pattern as shown in FIG. 19, a smoothing process is performed in which the value b of the point Pb is changed to a value (β) that is compressed to “0” when the n-value conversion process is performed. Here, a value compressed to “0” is referred to as a compressed value, and the compressed value is set to a fixed value that is smaller than the second threshold value α2 and equal to or greater than zero. By this processing, it is possible to accurately reflect the features of both patterns in the n-value conversion processing without impairing the features of the preceding and following variation patterns.

なお、被圧縮値を0に設定する場合、後段の変動パターンの平滑化に点Pbの圧縮値を使用すると、後段の変動パターンの特徴が若干変わってしまうが、それを問題にしないのであれば、被圧縮値を0に設定しても良い。   Note that when the compressed value is set to 0, if the compression value at the point Pb is used for smoothing the subsequent fluctuation pattern, the characteristics of the subsequent fluctuation pattern will slightly change. The compressed value may be set to 0.

次に、図20〜図23に示す射影データの変動パターンの具体例を用いて、垂直方向ブロック射影データ平滑化部34における平滑化処理による効果を説明する。   Next, the effect of the smoothing process in the vertical direction block projection data smoothing unit 34 will be described using specific examples of the variation pattern of the projection data shown in FIGS.

図20は、平滑化処理を施さない場合の垂直方向ブロック射影データの波形の一部である。図20に示すように、当該波形は、隣り合う各点で上下振動する波形である。   FIG. 20 shows a part of the waveform of the vertical block projection data when the smoothing process is not performed. As shown in FIG. 20, the waveform is a waveform that vibrates up and down at each adjacent point.

この振動の原因としては、前段回路における各種信号処理によるものの他、垂直方向に限って言えば、例えば、カメラ信号などでライン毎に信号レベルが微妙に変動している場合に、それが、射影処理を行う毎に加算(強調)されて顕著化したことが考えられる。   The cause of this vibration is not only due to various signal processing in the previous circuit, but also in the vertical direction, for example, when the signal level slightly varies from line to line in the camera signal etc. It is conceivable that the addition (emphasis) is made remarkable each time processing is performed.

図21は、図20に示した射影データに、3値化処理を行う場合の閾値αおよび−αを設定した状態を模式的に示す図であり、丸囲みした領域の各点で閾値を上下することが判る。従って、このまま3値化処理を行うと、3値化結果に大きな影響を与えることになる。   FIG. 21 is a diagram schematically showing a state in which threshold values α and −α are set for the projection data shown in FIG. 20 when the ternarization process is performed. The threshold values are increased and decreased at each point in a circled area. I know that Therefore, if the ternarization process is performed as it is, the ternarization result is greatly affected.

ここで、図16〜図19を用いて説明した平滑化処理を、図20に示した射影データに施した結果を図22に示す。   Here, FIG. 22 shows the result of applying the smoothing processing described with reference to FIGS. 16 to 19 to the projection data shown in FIG.

図22においては、元の垂直方向ブロック射影データの波形の全体的な特徴を残しながら、その上に重畳されている振動が除去された波形となっている。   In FIG. 22, while maintaining the overall characteristics of the waveform of the original vertical block projection data, the waveform superimposed thereon is removed.

例えば、丸囲みした領域R11〜R15は、図21において閾値を上下する領域に含まれるデータを平滑化した領域であり、これらについては、図16および図17を用いて説明した、両隣のデータの平均値を用いる平滑化処理が施されている。   For example, the circled regions R11 to R15 are regions obtained by smoothing the data included in the region where the threshold value is raised or lowered in FIG. 21, and these are the data of the adjacent data described with reference to FIGS. A smoothing process using an average value is performed.

また、領域R10は、図21において、例えば点22、点23および点24で示されるように、点23の値が閾値αより大きく、点22および点24の値が0より小さくなるような大きな変動を有する領域であり、これらについては、図18および図19を用いて説明した、3点のうち、中央の点の値をn値化処理を施した場合に「0」に圧縮される値に変更するという平滑化処理が施されている。   Further, the region R10 is large such that the value of the point 23 is larger than the threshold value α and the values of the point 22 and the point 24 are smaller than 0, as indicated by the points 22, 23 and 24 in FIG. These are areas having fluctuations, and these are values that are compressed to “0” when the value of the central point among the three points described with reference to FIGS. 18 and 19 is subjected to n-value conversion processing. The smoothing process of changing to is performed.

以上のような平滑化処理を施すことで、閾値との交差点近傍における振動によって3値化値に大きな影響を与えることのない垂直方向ブロック射影データが得られる。   By performing the smoothing process as described above, vertical block projection data that does not significantly affect the ternary value due to the vibration in the vicinity of the intersection with the threshold value can be obtained.

図23は、第1の垂直方向ブロック射影データをn値化器314によるn値化処理後に、加算器315により、第1の閾値交差点探索部29で検出された全ての第1の閾値交差点について、各第1の閾値交差点を中心とした動きベクトル検出範囲(先に説明した±Vの範囲)で加算した垂直方向ブロックn値化データの一例を図示したものである。ここで、Vは31であり、横軸の目盛り32が水平方向動きベクトル0の位置を示している。   FIG. 23 shows all first threshold value intersections detected by the first threshold value intersection search unit 29 by the adder 315 after the first vertical block projection data is n-valued by the n-value generator 314. FIG. 10 illustrates an example of vertical block n-valued data added in a motion vector detection range (range of ± V described above) centered on each first threshold intersection. Here, V is 31 and the horizontal scale 32 indicates the position of the horizontal motion vector 0.

そして、塗り潰した菱形で示されているデータが「平滑化処理なし」のデータであり、塗り潰した正方形で示されているデータが「平滑化処理あり」のデータである。   The data indicated by the filled diamonds is “no smoothing” data, and the data indicated by the filled squares is “smoothed” data.

両データによってそれぞれ表される波形のうち、「平滑化処理なし」の波形は大きく振動しており、各所で上に凸、下に凸となっている。一方で、「平滑化処理あり」の波形は元の波形の特徴を残しながらも、余計な凹凸を有していない波形となっている。   Of the waveforms represented by both data, the waveform of “no smoothing” is oscillating greatly, and is convex upward and downward in various places. On the other hand, the waveform with “smoothing process” is a waveform that does not have extra unevenness while retaining the characteristics of the original waveform.

図23においては、「平滑化処理なし」の波形、「平滑化処理あり」の波形ともに、目盛り30の位置に最大ピークがあるので、ピーク検出器317にて、動きベクトル検出範囲全体の最大ピーク位置を水平方向動きベクトルと判断する場合には、誤判定は発生しない。   In FIG. 23, both the “no smoothing” waveform and the “smoothing” waveform have a maximum peak at the position of the scale 30, so the peak detector 317 uses the maximum peak of the entire motion vector detection range. When the position is determined as a horizontal motion vector, no erroneous determination occurs.

しかし、例えば、値が負→正→負と変化する「上に凸な塊」毎にピーク位置を算出し、その「塊」毎のピーク値の大小を評価することにより、周期性画像に対する動きベクトル算出結果を排除するような信頼性評価を行い、より算出精度を高めるような方法を採る場合においては、本例の「平滑化処理なし」の波形は「信頼性なし」と評価されるが、「平滑化処理あり」の波形では、正しい水平方向動きベクトルを算出することができる。   However, for example, by calculating the peak position for each “upward convex block” whose value changes from negative to positive to negative, and evaluating the magnitude of the peak value for each “block”, the movement of the periodic image When a reliability evaluation is performed to eliminate the vector calculation result and a method that further increases the calculation accuracy is adopted, the waveform of “no smoothing process” in this example is evaluated as “no reliability”. For the waveform “with smoothing”, a correct horizontal motion vector can be calculated.

すなわち、「平滑化処理なし」の波形においては、目盛り30以外に、目盛り28、目盛り32の他、多数の位置において、「塊」が形成され、それぞれ、40、30、26という加算値を有している。本来、小さなピーク以外には唯一の大きなピークを持つべきものであり、このように、多数の位置において、同等の大きなピーク値を持つ場合には、その結果は信頼に値しない。   That is, in the waveform of “without smoothing”, in addition to the scale 30, in addition to the scale 28 and the scale 32, “lumps” are formed at a large number of positions, and each has an added value of 40, 30, and 26. is doing. Originally, it should have only one large peak other than a small peak. Thus, in the case of having a large peak value equivalent at many positions, the result is not reliable.

一方、「平滑化処理あり」の波形では、目盛り30で加算値21、目盛り42で加算値5、目盛り5で加算値3のピークを持つが、目盛り30のピークは唯一の大きなピークと判断できるため、目盛り30、すなわち、ベクトル−2を水平方向動きベクトルと判断することができる。   On the other hand, the waveform of “with smoothing process” has a peak of the addition value 21 at the scale 30, the addition value 5 at the scale 42, and the addition value 3 at the scale 5, but the peak of the scale 30 can be determined as the only large peak. Therefore, the scale 30, that is, the vector-2 can be determined as a horizontal motion vector.

ピーク検出器317で垂直方向ブロック毎に算出された水平方向動きベクトルは、順次に出力端子318を介して水平方向動きベクトル決定部32に入力される。   The horizontal motion vector calculated for each vertical block by the peak detector 317 is sequentially input to the horizontal motion vector determination unit 32 via the output terminal 318.

水平方向動きベクトル決定部32では、垂直方向ブロック水平方向動きベクトル算出部31から順次に出力される各垂直方向ブロックの水平方向動きベクトルに基づき、画像全体の水平方向動きベクトルが決定される。具体的には、各垂直方向ブロックの水平方向動きベクトルについてヒストグラムを作成し、ヒストグラム値の最も大きな水平方向動きベクトルを、画面全体の水平方向動きベクトルとするなどである。   In the horizontal direction motion vector determination unit 32, the horizontal direction motion vector of the entire image is determined based on the horizontal direction motion vector of each vertical direction block sequentially output from the vertical direction block horizontal direction motion vector calculation unit 31. Specifically, a histogram is created for the horizontal motion vector of each vertical block, and the horizontal motion vector having the largest histogram value is used as the horizontal motion vector for the entire screen.

以上説明したように、垂直方向ブロック射影データ平滑化部34において、垂直方向ブロック射影データの大きな傾向(特徴)を損なうことなく、垂直方向ブロック射影データに重畳された変動ノイズを除去することができ、加算器315での加算結果として余計なピークを発生させることがないため、ピーク検出部317における誤判定と信頼性低下を軽減することができる。結果として、信頼性のある垂直方向ブロック水平方向動きベクトルを算出することができる。   As described above, the vertical block projection data smoothing unit 34 can remove the fluctuation noise superimposed on the vertical block projection data without impairing the large tendency (feature) of the vertical block projection data. Since an extra peak is not generated as a result of addition by the adder 315, erroneous determination and a decrease in reliability in the peak detector 317 can be reduced. As a result, a reliable vertical block horizontal motion vector can be calculated.

<垂直方向動きベクトル検出部4の動作>
次に、動きベクトル検出装置1において画像の垂直方向の動きベクトルを検出する垂直方向動きベクトル検出部4の動作を説明する。
<Operation of Vertical Motion Vector Detection Unit 4>
Next, the operation of the vertical motion vector detection unit 4 that detects the vertical motion vector of the image in the motion vector detection device 1 will be described.

図2のように水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像が、図6に示す垂直方向動きベクトル検出部4の入力端子40に入力されると、水平方向画像分割部41で水平方向にブロック分割される。すなわち、水平方向画像分割部41においては、フレーム画像において水平方向に分割して得られる複数の画像領域(水平方向ブロック)が設定される。これにより、以降の処理では、水平方向ブロック毎に処理や管理が行われることとなる。   As shown in FIG. 2, when a frame image read out by repeating the pixel scanning of the horizontal line in order in the vertical direction is input to the input terminal 40 of the vertical direction motion vector detection unit 4 shown in FIG. In 41, the blocks are horizontally divided. That is, the horizontal image dividing unit 41 sets a plurality of image regions (horizontal blocks) obtained by dividing the frame image in the horizontal direction. As a result, in the subsequent processing, processing and management are performed for each horizontal block.

水平方向画像分割部41では、例えば図13(a)に示すように640画素×480画素の画像データが、水平方向に64画素の幅(分割幅)を有した10個の垂直方向ブロックhb0〜hb9に分割される。なお、図13(a)に示す分割幅および分割数とするのは必須でなく、例えば分割数を1にしても良い。   In the horizontal image dividing unit 41, for example, as shown in FIG. 13A, image data of 640 pixels × 480 pixels is divided into 10 vertical blocks hb0 to hb0 having a width (divided width) of 64 pixels in the horizontal direction. Divided into hb9. Note that the division width and the number of divisions shown in FIG. 13A are not essential, and the number of divisions may be set to 1, for example.

水平方向画像分割部41で図13(a)のように10個の水平方向ブロックhb0〜hb9に分割された画像は、水平方向エッジ抽出フィルタリング部42において水平方向に延びるエッジ成分の抽出、換言すれば垂直方向に急峻に変化する画像部分を強調するようなフィルタリング処理が施される。   The image divided by the horizontal image dividing unit 41 into 10 horizontal blocks hb0 to hb9 as shown in FIG. 13A is extracted, in other words, edge components extending in the horizontal direction by the horizontal edge extraction filtering unit 42. For example, a filtering process for emphasizing an image portion that changes sharply in the vertical direction is performed.

このフィルタリング処理で用いられるフィルタとしては、単純に水平方向に隣接する画素との差分を取る(1,−1)の2タップフィルタや、2次微分に相当する(−1,2,−1)の3タップフィルタなどの使用が可能である。なお、このようなフィルタを使用するのは必須でなく、垂直方向に輝度変化が大きくなる画像部分において出力値が上昇するフィルタであれば良い。   As a filter used in this filtering processing, a (1, -1,) 2-tap filter that simply takes a difference from a pixel adjacent in the horizontal direction, or (-1, 2, -1) corresponding to a second order differential. It is possible to use a 3-tap filter. It is not essential to use such a filter, and any filter may be used as long as the output value increases in an image portion where the luminance change is large in the vertical direction.

水平方向エッジ抽出フィルタリング部42で各水平方向ブロック(画像領域)hb0〜hb9ごとに水平方向のエッジが強調された画像データは、水平方向ブロック射影部43に入力され、水平方向ブロック射影部43で水平方向に射影される。この射影により、水平方向の(ライン間で)ノイズ成分を低減でき、また水平方向のエッジ成分をより強調できるため、特徴点に対応する水平方向エッジを際立たせて動きベクトル検出精度の向上を図れることとなる。水平方向ブロック射影部43の動作について、図13(b)の概念図を参照しつつ説明する。   The image data in which the horizontal edge is enhanced for each horizontal block (image region) hb0 to hb9 by the horizontal edge extraction filtering unit 42 is input to the horizontal block projection unit 43, and the horizontal block projection unit 43 outputs the image data. Projected horizontally. This projection can reduce the noise component in the horizontal direction (between lines) and can further enhance the edge component in the horizontal direction, so that the horizontal edge corresponding to the feature point can be emphasized and the motion vector detection accuracy can be improved. It will be. The operation of the horizontal block projection unit 43 will be described with reference to the conceptual diagram of FIG.

水平方向ブロック射影部43では、図13(a)に示す各水平方向ブロックhb0〜hb9の1水平ラインの入力が完了した時点で、1垂直ライン分のデータ配列Mhを有する水平方向射影データhn0〜hn9(図13(b))の1配列要素が生成される。従って、全配列要素が揃うのは、各水平方向ブロックhb0〜hb9の最終の水平ラインの入力が完了した時点である。なお、データ配列Mhは、垂直ラインの全画素数(例えば480)の配列要素を有しているが、(1,−1)のような2タップフィルタでは有効要素が垂直ラインの全画素数−1(例えば479)、(−1,2,−1)のような3タップフィルタでは有効要素が垂直ラインの全画素数−2(例えば478)となる。   In the horizontal block projection unit 43, when the input of one horizontal line in each of the horizontal blocks hb0 to hb9 shown in FIG. 13A is completed, the horizontal projection data hn0 having the data array Mh for one vertical line. One array element of hn9 (FIG. 13B) is generated. Therefore, all the array elements are arranged when the input of the final horizontal line of each horizontal block hb0 to hb9 is completed. The data array Mh has array elements of the total number of pixels of the vertical line (for example, 480), but in a 2-tap filter such as (1, -1), the effective element is the total number of pixels of the vertical line − In a 3-tap filter such as 1 (for example, 479) and (-1, 2, -1), the effective elements are the total number of pixels in the vertical line -2 (for example, 478).

具体的には、図7に示すように入力端子431を介して入力された各水平方向ブロックhb0〜hb9の画像データ(水平方向のエッジ強調が施された画像データ)が、加算器432に入力される。加算器432では、まず入力された水平方向ブロックの1水平ラインの先頭では、水平方向射影一時記憶メモリ433内のデータを読み出すことなく、水平方向射影一時記憶メモリ433に書き込まれる。次に、加算器432では、水平方向射影一時記憶メモリ433に記憶されている1水平ラインの前画素までの加算結果を読み出し、入力端子431から入力される水平方向ブロックの1水平ラインの現画素との加算を行って、その加算結果を水平方向射影一時記憶メモリ433に書き戻す。そして、水平方向ブロックにおける1水平ラインの最終画素が加算器432に入力されると、水平方向射影一時記憶メモリ433に保存された前画素までの加算結果を読み出し、入力端子431から入力される水平方向ブロックの1水平ラインの最終画素との加算を行って、その加算結果、つまり水平方向ブロックの1水平ラインの全画素が加算されたデータを水平方向ブロックの1水平ラインに関する射影データとして、出力端子434から第1の水平方向ブロック射影ラインメモリ44と第1の水平方向ブロック射影データ最大値保存部45とに出力する。なお、加算器432において水平方向ブロックの1水平ラインの全画素が加算された射影データを水平方向射影一時記憶メモリ433に一旦記憶させ、次の水平方向ブロックの1水平ラインの先頭画素が入力される際に、水平方向射影一時記憶メモリ433内の射影データを読み出して出力端子434から出力するようにしても良い。   Specifically, as shown in FIG. 7, the image data (image data subjected to edge enhancement in the horizontal direction) of the horizontal blocks hb0 to hb9 input via the input terminal 431 is input to the adder 432. Is done. The adder 432 first writes the data in the horizontal projection temporary storage memory 433 without reading the data in the horizontal projection temporary storage memory 433 at the head of one horizontal line of the input horizontal block. Next, the adder 432 reads the addition result up to the previous pixel of one horizontal line stored in the horizontal projection temporary storage memory 433, and the current pixel of one horizontal line of the horizontal block input from the input terminal 431. And the addition result is written back to the horizontal projection temporary storage memory 433. When the final pixel of one horizontal line in the horizontal block is input to the adder 432, the addition result up to the previous pixel stored in the horizontal projection temporary storage memory 433 is read and the horizontal input from the input terminal 431 is read. Addition with the final pixel of one horizontal line of the direction block, and output the addition result, that is, data obtained by adding all the pixels of one horizontal line of the horizontal block as projection data for one horizontal line of the horizontal block The data is output from the terminal 434 to the first horizontal block projection line memory 44 and the first horizontal block projection data maximum value storage unit 45. The projection data obtained by adding all the pixels of one horizontal line of the horizontal block in the adder 432 is temporarily stored in the horizontal projection temporary storage memory 433, and the first pixel of one horizontal line of the next horizontal block is input. In this case, the projection data in the horizontal projection temporary storage memory 433 may be read out and output from the output terminal 434.

第1の水平方向ブロック射影ラインメモリ44では、水平方向ブロック射影部43から入力された現フレームの水平方向ブロック射影データを、第1の水平方向ブロック射影データとして水平方向ブロック毎に保存する。   The first horizontal block projection line memory 44 stores the horizontal block projection data of the current frame input from the horizontal block projection unit 43 for each horizontal block as first horizontal block projection data.

第1の水平方向ブロック射影ラインメモリ44に保存された水平方向ブロック射影データは、必要なデータが揃った時点で、水平方向ブロック射影データ平滑化部53に読み出され、平滑化処理がなされた後、第1の水平方向ブロック射影ラインメモリ44に書き戻される。例えば、Pa、Pb、Pcという垂直方向に連続する3点を使って平滑化処理を行う場合には、「必要なデータが揃った時点」とは、垂直方向に3点が揃った時点ということになり、このとき、真ん中の点Pbの平滑化処理が可能ということになる。水平方向ブロック射影データ平滑化部53における平滑化処理の詳細については、後述する。   The horizontal block projection data stored in the first horizontal block projection line memory 44 is read out by the horizontal block projection data smoothing unit 53 when necessary data is prepared, and smoothed. Thereafter, the data is written back to the first horizontal block projection line memory 44. For example, when the smoothing process is performed using three consecutive points Pa, Pb, and Pc in the vertical direction, “when all necessary data is aligned” means when three points are aligned in the vertical direction. At this time, it is possible to smooth the center point Pb. Details of the smoothing processing in the horizontal block projection data smoothing unit 53 will be described later.

第1の水平方向ブロック射影データ最大値保存部45では、水平方向ブロック射影部43から入力された水平方向ブロックの射影データに関する最大値を算出し、第1の水平方向ブロック射影データ最大値(現フレームの水平方向ブロック射影データ最大値)として保存する。   The first horizontal block projection data maximum value storage unit 45 calculates the maximum value related to the projection data of the horizontal block input from the horizontal block projection unit 43, and the first horizontal block projection data maximum value (current Frame horizontal block projection data maximum value).

第2の水平方向ブロック射影ラインメモリ46は、第1の水平方向ブロック射影ラインメモリ44から読み出された水平方向ブロック射影データを、前フレームに関する第2の水平方向ブロック射影データとして保存する。同様に、第2の水平方向ブロック射影データ最大値保存部47では、第1の水平方向ブロック射影データ最大値保存部45から出力された第1の水平方向ブロック射影データ最大値が、前フレームに関する第2の水平方向ブロック射影データ最大値(前フレームの水平方向ブロック射影データ最大値)として保存される。換言すれば、第1の水平方向ブロック射影データ最大値保存部45に保存された現フレームの水平方向ブロック射影データ最大値は、次のフレームでは、第2の水平方向ブロック射影データ最大値保存部47に前フレームの水平方向ブロック射影データ最大値として保存されることとなる。   The second horizontal block projection line memory 46 stores the horizontal block projection data read from the first horizontal block projection line memory 44 as second horizontal block projection data related to the previous frame. Similarly, in the second horizontal block projection data maximum value storage unit 47, the first horizontal block projection data maximum value output from the first horizontal block projection data maximum value storage unit 45 is related to the previous frame. It is stored as the second horizontal block projection data maximum value (horizontal block projection data maximum value of the previous frame). In other words, the horizontal block projection data maximum value of the current frame stored in the first horizontal block projection data maximum value storage unit 45 is the second horizontal block projection data maximum value storage unit in the next frame. 47 is stored as the horizontal block projection data maximum value of the previous frame.

また、第2の水平方向ブロック射影データ最大値保存部47では、算出された前フレームの水平方向ブロック射影データ最大値に基づき、第4の閾値を算出する。例えば、前フレームの水平方向ブロック射影データ最大値をP4maxとすると、第4の閾値α4は次の式(3)で算出される。   The second horizontal block projection data maximum value storage unit 47 calculates a fourth threshold value based on the calculated horizontal block projection data maximum value of the previous frame. For example, if the maximum horizontal block projection data value of the previous frame is P4max, the fourth threshold value α4 is calculated by the following equation (3).

α4=P4max×k4・・・・・・・・(3)
ここで、k4は予め定められた係数で、0<k4<1である。
α4 = P4max × k4 (3)
Here, k4 is a predetermined coefficient, and 0 <k4 <1.

なお、第4の閾値α4の演算は、上式(3)に限るものではなく、前フレームの水平方向ブロック射影データ最大値P4maxが大きくなれば第4の閾値α4が大きくなるものであれば良く、また変換テーブルを使用しても良い。また、第4の閾値α4については、水平方向ブロック毎の第2の水平方向ブロック射影データ最大値を使用するのは必須でなく、例えば前フレームの画像全体についての水平方向ブロック射影データの最大値を用いて第4の閾値を算出し、画像全体で同じ第4の閾値を採用しても良い。   Note that the calculation of the fourth threshold value α4 is not limited to the above equation (3), and it is sufficient if the fourth threshold value α4 increases as the horizontal block projection data maximum value P4max of the previous frame increases. Alternatively, a conversion table may be used. For the fourth threshold α4, it is not essential to use the second horizontal block projection data maximum value for each horizontal block. For example, the maximum value of the horizontal block projection data for the entire image of the previous frame is used. The fourth threshold value may be calculated by using the same fourth threshold value for the entire image.

第2の水平方向ブロック射影データ最大値保存部47は、前フレームに関する第2の水平方向ブロック射影データ最大値に基づき、第3の閾値(所定の一定値)が設定される。例えば、前フレームの水平方向ブロック射影データ最大値をP3maxとすると、第3の閾値α3は次の式(4)で算出される。   The second horizontal block projection data maximum value storage unit 47 sets a third threshold value (predetermined constant value) based on the second horizontal block projection data maximum value for the previous frame. For example, if the maximum horizontal block projection data value of the previous frame is P3max, the third threshold value α3 is calculated by the following equation (4).

α3=P3max×k3・・・・・・・・(4)
ここで、k3は予め定められた係数で、0<k3<1である。
α3 = P3max × k3 (4)
Here, k3 is a predetermined coefficient, and 0 <k3 <1.

なお、第3の閾値α3の演算は、上式(4)に限るものではなく、前フレームの水平方向ブロック射影データ最大値P3maxが大きくなれば第3の閾値α3が大きくなるものであれば良く、また変換テーブルを使用しても良い。また、第3の閾値α3については、水平方向ブロック毎の第2の水平方向ブロック射影データ最大値を使用するのは必須でなく、例えば前フレームの画像全体についての水平方向ブロック射影データの最大値を用いて第3の閾値を算出し、画像全体で同じ第3の閾値を採用しても良い。   Note that the calculation of the third threshold value α3 is not limited to the above equation (4), and it is sufficient if the third threshold value α3 increases as the horizontal block projection data maximum value P3max of the previous frame increases. Alternatively, a conversion table may be used. For the third threshold α3, it is not essential to use the second horizontal block projection data maximum value for each horizontal block. For example, the maximum value of the horizontal block projection data for the entire image of the previous frame is used. May be used to calculate the third threshold value, and the same third threshold value may be adopted for the entire image.

第3の閾値交差点探索部48では、第2の水平方向ブロック射影ラインメモリ46から読み出された第2の水平方向ブロック射影データと、第2の水平方向ブロック射影データ最大値保存部47から出力された第3の閾値との交差点(第3の閾値交差点)を垂直方向に探索する。この第3の閾値交差点探索部48で得られた第3の閾値交差点の情報は、水平方向ブロック射影データ読み出し部49と水平方向ブロック垂直方向動きベクトル算出部50とに入力される。   The third threshold intersection search unit 48 outputs the second horizontal block projection data read from the second horizontal block projection line memory 46 and the second horizontal block projection data maximum value storage unit 47. The intersection with the third threshold value (third threshold value intersection) is searched in the vertical direction. The information on the third threshold intersection obtained by the third threshold intersection searching unit 48 is input to the horizontal block projection data reading unit 49 and the horizontal block vertical motion vector calculating unit 50.

水平方向ブロック射影データ読み出し部49は、第3の閾値交差点探索部48から出力された第3の閾値交差点を中心とした動きベクトル検出範囲に対応した現フレームの(第1の)水平方向ブロック射影データを第1の水平方向ブロック射影ラインメモリ44から読み出す。すなわち、第3の閾値交差点をB(i)(ただしi=1,2,・・・qで、qは検出された第3の閾値交差点の総数)とし、動きベクトル検出範囲を第3の閾値交差点を中心とした(−U)から(+U)(ただしUは正の整数)の範囲とすると、第1の水平方向ブロック射影ラインメモリ44から読み出される射影データは、垂直方向において(B(i)−U)から(B(i)+U)までの範囲にある第1の水平方向ブロック射影データの部分データとなる。   The horizontal block projection data reading unit 49 outputs the (first) horizontal block projection of the current frame corresponding to the motion vector detection range centered on the third threshold intersection output from the third threshold intersection search unit 48. Data is read from the first horizontal block projection line memory 44. That is, the third threshold intersection is B (i) (where i = 1, 2,... Q, q is the total number of detected third threshold intersections), and the motion vector detection range is the third threshold. Assuming the range from (−U) to (+ U) (where U is a positive integer) centered on the intersection, the projection data read from the first horizontal block projection line memory 44 is (B (i ) −U) to (B (i) + U), which is partial data of the first horizontal block projection data.

この水平方向ブロック射影データ読み出し部49によって第1の水平方向ブロック射影ラインメモリ44から読み出された第1の水平方向ブロック射影データは、水平方向ブロック垂直方向動きベクトル算出部50に出力される。   The first horizontal block projection data read from the first horizontal block projection line memory 44 by the horizontal block projection data reading unit 49 is output to the horizontal block vertical motion vector calculation unit 50.

水平方向ブロック射影データ読み出し部49から出力された第1の水平方向ブロック射影データは、図8に示す水平方向ブロック垂直方向動きベクトル算出部50の入力端子501を介してn値化器504に入力される。このn値化器504では、第2の水平方向ブロック射影データ最大値保存部47から出力され、入力端子502を介して入力された第4の閾値に基づき、第1の水平方向ブロック射影データをn値化する。すなわち、n値化器504は、水平方向ブロック射影データ読み出し部49で抽出された現フレームの射影データに関するデータ配列Mh(図13(b))の各配列要素のデータ長を圧縮する。このn値化器504の処理については、上述したn値化器314と同様の処理を行い、例えば3値化処理が実行される。すなわち、n値化器504における3値化処理では、前フレームの射影データにおけるデータ配列Mhの配列要素の最大値に基づき設定される第4の閾値α4(α4>0)に関して、水平方向ブロック射影データ読み出し部49で抽出された現フレームの射影データに関する配列要素の値が、(−α4)より小さい場合、(−α4)以上でα4以下の場合、およびα4より大きい場合の3段階による3値化が行われる。なお、n値化器504においては、n値化器314と同じ特性を有するのは必須でなく、n値化器504と異なる特性を有しても良い。   The first horizontal block projection data output from the horizontal block projection data reading unit 49 is input to the n-value converter 504 via the input terminal 501 of the horizontal block vertical motion vector calculation unit 50 shown in FIG. Is done. The n-value converter 504 outputs the first horizontal block projection data based on the fourth threshold value output from the second horizontal block projection data maximum value storage unit 47 and input via the input terminal 502. n-valued. That is, the n-value converter 504 compresses the data length of each array element of the data array Mh (FIG. 13B) regarding the projection data of the current frame extracted by the horizontal block projection data reading unit 49. About the process of this n value digitizer 504, the process similar to the n value digitizer 314 mentioned above is performed, for example, a 3 value process is performed. That is, in the ternarization processing in the n-value quantizer 504, the horizontal block projection is performed with respect to the fourth threshold value α4 (α4> 0) set based on the maximum value of the array element of the data array Mh in the projection data of the previous frame. Three values in three stages when the value of the array element relating to the projection data of the current frame extracted by the data reading unit 49 is smaller than (−α4), (−α4) or more and α4 or less, and greater than α4. Is done. Note that the n-value generator 504 does not necessarily have the same characteristics as the n-value generator 314, and may have different characteristics from the n-value generator 504.

以上で説明した第3の閾値交差点探索部48、水平方向ブロック射影データ読み出し部49および水平方向ブロック垂直方向動きベクトル算出部50の動作について、図14(a)、図14(b)および図14(c)を参照しつつ具体的に説明する。なお、図14(a)および図14(b)の横軸は、射影データのデータ配列Mh(図13(b))の配列要素の位置を示している。また、図14(a)では、第3の閾値交差点B(1)〜B(6)それぞれを丸印で表している。   The operations of the third threshold value intersection search unit 48, the horizontal block projection data read unit 49, and the horizontal block vertical motion vector calculation unit 50 described above are illustrated in FIGS. This will be specifically described with reference to (c). 14A and 14B indicate the positions of the array elements of the projection data array Mh (FIG. 13B). In FIG. 14A, the third threshold value intersections B (1) to B (6) are indicated by circles.

第3の閾値交差点探索部48では、図14(a)に示すように前フレームに関する第2の垂直方向ブロック射影データW4の波形において、第2の水平方向ブロック射影データ最大値保存部47から出力された第3の閾値α3と交差する第3の閾値交差点B(1)〜B(6)が求められる。すなわち、第3の閾値交差点探索部48は、前フレームに対して水平方向ブロック射影部43で得られた射影データに関して射影データのデータ配列Mh(図13(b))の要素順に配列要素の値をグラフ化した波形W4と、配列要素の値が第3の閾値(所定の一定値)α3となる一次関数の直線とが交差する各第3の閾値交差点の配列要素の位置を特定する。   In the third threshold intersection search unit 48, the second horizontal block projection data maximum value storage unit 47 outputs the waveform of the second vertical block projection data W4 for the previous frame as shown in FIG. The third threshold value intersections B (1) to B (6) that intersect with the third threshold value α3 are obtained. That is, the third threshold value intersection search unit 48 sets the array element values in the order of the elements in the projection data array Mh (FIG. 13B) with respect to the projection data obtained by the horizontal block projection unit 43 with respect to the previous frame. The position of the array element at each third threshold crossing point where the waveform W4 and the line of the linear function whose array element value is the third threshold value (predetermined constant value) α3 intersects is specified.

次に、水平方向ブロック射影データ読み出し部49では、図14(a)に示す各第3の閾値交差点B(1)〜B(6)を中心とした所定の動きベクトル検出範囲について第1の水平方向ブロック射影ラインメモリ44から現フレームの水平方向ブロック射影データが読み出される。すなわち、水平方向ブロック射影データ読み出し部49は、各第3の閾値交差点における射影データ(データ配列)の配列要素の位置を中心とした所定範囲のデータ配列を、水平方向ブロック射影部43で得られた現フレーム(後フレーム)の射影データから抽出する。例えば第3の閾値交差点B(4)に関しては、図14(b)に示すように第3の閾値交差点B(4)を中心に(B(4)−U)から(B(4)+U)までの範囲(矩形の破線内の波形部分)に対応する第1の水平方向ブロック射影データW3が読み出される。   Next, in the horizontal block projection data reading unit 49, a first horizontal vector is detected for a predetermined motion vector detection range centered on each of the third threshold intersections B (1) to B (6) shown in FIG. The horizontal block projection data of the current frame is read from the direction block projection line memory 44. That is, the horizontal block projection data reading unit 49 obtains a data array in a predetermined range centered on the position of the array element of the projection data (data array) at each third threshold intersection at the horizontal block projection unit 43. Extracted from the projection data of the current frame (back frame). For example, with respect to the third threshold value intersection B (4), as shown in FIG. 14B, the third threshold value intersection B (4) is centered on (B (4) -U) to (B (4) + U). The first horizontal block projection data W3 corresponding to the range up to (the waveform portion within the rectangular broken line) is read out.

そして、水平方向ブロック射影データ読み出し部49によって読み出された第1の水平方向ブロック射影データは、第2の水平方向ブロック射影データ最大値保存部47から出力された第4の閾値α4を用いて、水平方向ブロック垂直方向動きベクトル算出部50のn値器504でn値化処理される。例えば第3の閾値交差点B(4)に関しては、図14(b)に示す第4の閾値α4および(−α4)に対する第1の水平方向ブロック射影データW3の大小関係に基づき、第3の閾値交差点B(4)を中心に(B(4)−U)から(B(4)+U)までの範囲(矩形の破線内の波形部分)について、図14(c)のように第1の水平方向ブロック射影データが3値化処理される。これにより、現フレームの水平方向ブロック射影データが「−1」、「0」または「1」で表されることとなる。   The first horizontal block projection data read out by the horizontal block projection data reading unit 49 uses the fourth threshold value α4 output from the second horizontal block projection data maximum value storage unit 47. The n-value unit 504 of the horizontal block vertical motion vector calculation unit 50 performs n-value processing. For example, for the third threshold value intersection B (4), the third threshold value is based on the magnitude relationship of the first horizontal block projection data W3 with respect to the fourth threshold values α4 and (−α4) shown in FIG. For the range from (B (4) -U) to (B (4) + U) centering on the intersection B (4) (the waveform portion within the rectangular broken line), the first horizontal as shown in FIG. The direction block projection data is ternarized. As a result, the horizontal block projection data of the current frame is represented by “−1”, “0”, or “1”.

n値化器504では、第3の閾値交差点探索部48から出力される全ての第3の閾値交差点について、図14(c)に示すようなn値化処理が行われる。   In the n-value converter 504, n-value conversion processing as shown in FIG. 14C is performed on all the third threshold value intersections output from the third threshold value intersection search unit 48.

次に、加算器505(図8)では、入力端子503を介して第3の閾値交差点探索部48から出力された第3の閾値交差点を中心に、n値化器504でn値化された第1の水平方向ブロック射影データと、垂直方向動きベクトル加算メモリ506から読み出されたひとつ前までのn値化された第1の水平方向ブロック射影データの加算値とを加算し、その加算結果を垂直方向動きベクトル加算メモリ506に再び記憶させる。そして、第3の閾値交差点探索部48で検出された全ての第3の閾値交差点のうち最後のものに関するn値化された第1の水平方向ブロック射影データを加算器505で加算して1つの水平方向ブロックについての加算処理を終了する際には、その加算結果をピーク検出器507に出力するようにする。なお、加算器505での加算処理終了後に、全ての第3の閾値交差点に関する加算結果を記憶している垂直方向動きベクトル加算メモリ506から、その加算結果をピーク検出部507が読み出すようにしても良い。   Next, the adder 505 (FIG. 8) is n-valued by the n-value generator 504 around the third threshold value intersection output from the third threshold value intersection search unit 48 via the input terminal 503. The first horizontal block projection data is added to the addition value of the first horizontal block projection data converted to n-values read from the vertical motion vector addition memory 506, and the addition result Are stored in the vertical motion vector addition memory 506 again. Then, the adder 505 adds the n-valued first horizontal block projection data regarding the last one of all the third threshold intersections detected by the third threshold intersection search unit 48 to obtain one When the addition process for the horizontal block is finished, the addition result is output to the peak detector 507. In addition, after the addition process in the adder 505 is completed, the peak detection unit 507 may read out the addition result from the vertical motion vector addition memory 506 storing the addition results regarding all the third threshold intersections. good.

ピーク検出器507には、第3の閾値交差点探索部48で検出された全ての第3の閾値交差点について各第3の閾値交差点を中心とした動きベクトル検出範囲(上述した±Uの範囲)に対応するn値化済みの第1の水平方向ブロック射影データを加算したデータ(以下では「水平方向ブロックn値化データ」ともいう)が入力されるが、この水平方向ブロックn値化データに関するピーク値がピーク検出器507で検出される。このピーク検出器507において検出される水平方向ブロックn値化データのピーク位置が、その水平方向ブロックから得られる垂直方向動きベクトルとなり、出力端子508を介して垂直方向動き決定部51に出力される。   The peak detector 507 includes a motion vector detection range (the above-described ± U range) centered on each third threshold intersection for all the third threshold intersections detected by the third threshold intersection search unit 48. Data obtained by adding the corresponding n-valued first horizontal block projection data (hereinafter also referred to as “horizontal block n-valued data”) is input. The value is detected by peak detector 507. The peak position of the horizontal block n-valued data detected by the peak detector 507 becomes the vertical motion vector obtained from the horizontal block, and is output to the vertical motion determination unit 51 via the output terminal 508. .

以上で説明した加算器505およびピーク検出部507の動作について、図15(a)および図15(b)を参照しつつ具体的に説明する。なお、図15(a)では、図14(a)に示す第3の閾値交差点B(1)〜B(6)を中心とした動きベクトル検出範囲(±Uの範囲)において第1の水平方向ブロック射影データを3値化したものを概念的に示している。   The operations of the adder 505 and the peak detector 507 described above will be specifically described with reference to FIGS. 15 (a) and 15 (b). In FIG. 15A, the first horizontal direction in the motion vector detection range (± U range) centering on the third threshold intersections B (1) to B (6) shown in FIG. The block projection data is conceptually shown as three values.

加算器505において、図15(a)に示す第3の閾値交差点B(1)〜B(6)周辺の3値化データが順次に入力されると、これらのデータが加算され、図15(b)に示すような水平方向ブロックn値化データが生成される。具体的には、加算器505において水平方向ブロック射影データ読み出し部49により水平方向ブロック射影データ(データ配列Mh(図13(b)))から抽出されn値器504でデータ長が圧縮された現フレームに係る動きベクトル検出範囲(所定範囲)のデータ配列それぞれについて、各第3の閾値交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値が加算されることとなる。   When the adder 505 sequentially inputs the ternary data around the third threshold intersections B (1) to B (6) shown in FIG. 15A, these data are added together, and FIG. Horizontal block n-valued data as shown in b) is generated. Specifically, the adder 505 extracts the current block projection data (data array Mh (FIG. 13B)) from the horizontal block projection data reading unit 49 and the n-value unit 504 compresses the data length. For each data array in the motion vector detection range (predetermined range) related to the frame, values of array elements having the same relative position with respect to the position of the array element at each third threshold intersection are added.

加算器505で生成された水平方向ブロックn値化データがピーク検出器507に入力されると、その水平方向ブロックの垂直方向動きベクトルとして図15(b)に示す垂直方向のピーク位置vvが検出される。すなわち、ピーク検出器507では、加算器505で加算された加算結果に基づき、フレーム画像の垂直方向に関する動きベクトルが検出される。   When the horizontal block n-valued data generated by the adder 505 is input to the peak detector 507, the vertical peak position vv shown in FIG. 15B is detected as the vertical motion vector of the horizontal block. Is done. That is, the peak detector 507 detects a motion vector in the vertical direction of the frame image based on the addition result added by the adder 505.

次に、水平方向ブロック射影データ平滑化部53における平滑化処理について、図16〜図19を用いて詳細に説明する。第1の水平方向ブロック射影ラインメモリ44に保存された水平方向ブロック射影データは、水平方向ブロック射影データ平滑化部53に読み出され、平滑化処理がなされた後、第1の水平方向ブロック射影ラインメモリ44に書き戻される。図16〜図19においては、Pa、Pb、Pcという垂直方向に連続する3点の配列要素を使って、平滑化処理を行う例を説明する。なお、a、b、cは、それぞれ、点Pa、Pb、Pcでの値である。   Next, the smoothing process in the horizontal block projection data smoothing unit 53 will be described in detail with reference to FIGS. The horizontal block projection data stored in the first horizontal block projection line memory 44 is read out by the horizontal block projection data smoothing unit 53, and after smoothing processing is performed, the first horizontal block projection data is read out. It is written back to the line memory 44. In FIGS. 16 to 19, an example will be described in which smoothing processing is performed using three-point array elements that are continuous in the vertical direction, such as Pa, Pb, and Pc. Note that a, b, and c are values at points Pa, Pb, and Pc, respectively.

図16は、射影データの変動パターンが「下に凸で、a>0、b≧0、c>0」の場合の平滑化処理を示している。   FIG. 16 shows a smoothing process when the variation pattern of the projection data is “convex downward, a> 0, b ≧ 0, c> 0”.

動きベクトルの検出には、射影データにおいて連続する複数の点による漸増、漸減が重要であり、少数の点による凹凸は閾値との関係により精度を落とす原因となるため、除去することが望ましい。従って、図16に示すパターンでは、中心の点Pbの値bを値aと値cとの平均値に変更することで、下に凸となった形状を解消する。   For detection of motion vectors, it is important to gradually increase and decrease by a plurality of consecutive points in the projection data, and unevenness due to a small number of points causes a drop in accuracy due to the relationship with the threshold value, so it is desirable to remove them. Therefore, in the pattern shown in FIG. 16, the downwardly convex shape is eliminated by changing the value b of the central point Pb to the average value of the values a and c.

同様に、図17は、射影データの変動パターンが「上に凸で、a<0、b≦0、c<0」の場合の平滑化処理を示している。この場合にも、中心の点Pbの値bを値aと値cとの平均値に変更することで、上に凸となった形状を解消する。   Similarly, FIG. 17 shows a smoothing process when the variation pattern of the projection data is “convex upward, a <0, b ≦ 0, c <0”. Also in this case, by changing the value b of the center point Pb to the average value of the values a and c, the shape that is convex upward is eliminated.

一方、図18は、射影データの変動パターンが「下に凸で、a>0、b<0、c>0」の場合の平滑化処理を示している。   On the other hand, FIG. 18 shows a smoothing process when the variation pattern of the projection data is “convex downward, a> 0, b <0, c> 0”.

この場合、b<−α2であり、このまま処理を進めると、値bは、n値化器504によるn値化処理(本例では3値化)の際に、第4の閾値−α4に基づいて−1とされ、前後の点Pa、Pcの値が1となった場合には、Pa、Pb、Pcの各点の値が、1、−1、1となって振動してしまう。それが、加算器505において、各第3の閾値交差点を中心に加算されることにより大きな振動(振幅)となり、本来、動きベクトル位置を指し示す位置に1つの大きなピークが立つべきところが、この振動により、本来のピーク位置でない部分においても大きな値を示すことになる。   In this case, b <−α2, and if the processing proceeds as it is, the value b is based on the fourth threshold value −α4 during the n-value conversion processing (in this example, ternarization) by the n-value converter 504. When the values of the front and rear points Pa and Pc are 1, the values of the points Pa, Pb, and Pc are 1, -1, 1 and vibrate. The adder 505 adds a large vibration (amplitude) by adding each of the third threshold intersections as the center, and this vibration causes a place where one large peak should be originally placed at the position indicating the motion vector position. A large value is also shown in a portion other than the original peak position.

しかし、図18に示す変動パターンに対しても図16あるいは図17と同様の平滑化処理を実行すると、射影データの特徴をn値化処理に正確に反映できなくなるという問題がある。   However, when the smoothing process similar to that shown in FIG. 16 or 17 is executed for the variation pattern shown in FIG. 18, there is a problem that the feature of the projection data cannot be accurately reflected in the n-value conversion process.

すなわち、図18に示すように、点Pbの値bが第4の閾値−α4より小さく、点Paおよび点Pcの値が0より大きくなるような大きな変動を示す場合、点Paは、点Paより前の点Pq、Pr、・・・(・・・<Pr<Pq<Pa)により構成される前段の変動パターンの一部を構成し、点Pbも前段の変動パターンを構成することが考えられる。   That is, as shown in FIG. 18, when the value b of the point Pb is smaller than the fourth threshold value −α4 and the point Pa and the value of the point Pc are larger than 0, the point Pa is the point Pa It is considered that a part of the former fluctuation pattern constituted by the earlier points Pq, Pr,... (<Pr <Pq <Pa) is constituted and the point Pb also constitutes the former fluctuation pattern. It is done.

また、点Pcは、点Pcより後の点Ps、Pt、・・・(Pc<Ps<Pt<・・・)により構成される後段の変動パターンの一部を構成し、点Pbも後段の変動パターンを構成することが考えられる。   Further, the point Pc constitutes a part of the subsequent fluctuation pattern constituted by the points Ps, Pt,... (Pc <Ps <Pt <...) After the point Pc, and the point Pb is also in the subsequent stage. It is conceivable to construct a variation pattern.

このような場合に、点Pbの値bを単純に値aと値cの平均値にする平滑化処理を行うと、前段の変動パターンおよび後段の変動パターンの特徴が改変されてしまうことになり、両パターンの特徴をn値化処理に正確に反映できなくなる。   In such a case, if the smoothing process is performed in which the value b of the point Pb is simply set to the average value of the value a and the value c, the characteristics of the fluctuation pattern in the preceding stage and the fluctuation pattern in the subsequent stage are modified. Thus, the features of both patterns cannot be accurately reflected in the n-value conversion process.

そこで、図18に示すような変動パターンにおいては、点Pbの値bを、n値化処理を施した場合に「0」に圧縮される値(−β)に変更するという平滑化処理を行う。ここで、「0」に圧縮される値を被圧縮値と呼称し、当該被圧縮値は、第2の閾値−α4よりも大きく、0以下の固定された値に設定する。この処理により、前段の変動パターンおよび後段の変動パターンの特徴を損なうことなく、両パターンの特徴をn値化処理に正確に反映することが可能となる。   Therefore, in the variation pattern as shown in FIG. 18, a smoothing process is performed in which the value b of the point Pb is changed to a value (−β) that is compressed to “0” when the n-value conversion process is performed. . Here, a value compressed to “0” is referred to as a compressed value, and the compressed value is set to a fixed value that is greater than the second threshold value −α4 and equal to or less than 0. By this processing, it is possible to accurately reflect the features of both patterns in the n-value conversion processing without impairing the features of the preceding and following variation patterns.

図19は、射影データの変動パターンが「上に凸で、a<0、b>0、c<0」の場合の平滑化処理を示している。   FIG. 19 shows the smoothing process when the variation pattern of the projection data is “convex upward, a <0, b> 0, c <0”.

この場合、b>α4であり、このまま処理を進めると、値bはn値化器504によるn値化処理(本例では3値化)の際に、第4の閾値α4に基づいて1とされ、前後の点Pa、Pcの値が−1となった場合には、Pa、Pb、Pcの各点の値が、−1、1、−1となって振動してしまう。それが、加算器505において、各第3の閾値交差点を中心に加算されることにより大きな振動(振幅)となり、本来、動きベクトル位置を指し示す位置に1つの大きなピークが立つべきところが、この振動により、本来のピーク位置でない部分においても大きな値を示すことになる。   In this case, b> α4, and if the processing proceeds as it is, the value b is set to 1 based on the fourth threshold value α4 during the n-value conversion processing (in this example, ternarization) by the n-value converter 504. When the values of the front and rear points Pa and Pc are -1, the values of the points Pa, Pb, and Pc become -1, 1, -1, and vibrate. The adder 505 adds a large vibration (amplitude) by adding each of the third threshold intersections as the center, and this vibration causes a place where one large peak should be originally placed at the position indicating the motion vector position. A large value is also shown in a portion other than the original peak position.

しかし、図19に示す変動パターンに対しても図16あるいは図17と同様の平滑化処理を実行すると、射影データの特徴をn値化処理に正確に反映できなくなるという問題がある。   However, when the smoothing process similar to that shown in FIG. 16 or 17 is executed for the variation pattern shown in FIG.

すなわち、図19に示すように、点Pbの値bが第4の閾値α4より大きく、点Paおよび点Pcの値が0より小さくなるような大きな変動を示す場合、点Paは、点Paより前の点Pq、Pr、・・・(・・・<Pr<Pq<Pa)により構成される前段の変動パターンの一部を構成し、点Pbも前段の変動パターンを構成することが考えられる。   That is, as shown in FIG. 19, when the value b of the point Pb is larger than the fourth threshold value α4 and the point Pa and the value of the point Pc are smaller than 0, the point Pa is larger than the point Pa. It is conceivable that a part of the former fluctuation pattern constituted by the previous points Pq, Pr,... (... <Pr <Pq <Pa) is constituted, and the point Pb also constitutes the former fluctuation pattern. .

また、点Pcは、点Pcより後の点Ps、Pt、・・・(Pc<Ps<Pt<・・・)により構成される後段の変動パターンの一部を構成し、点Pbも後段の変動パターンを構成することが考えられる。   Further, the point Pc constitutes a part of the subsequent fluctuation pattern constituted by the points Ps, Pt,... (Pc <Ps <Pt <...) After the point Pc, and the point Pb is also in the subsequent stage. It is conceivable to construct a variation pattern.

このような場合に、点Pbの値bを単純に値aと値cの平均値にする平滑化処理を行うと、前段の変動パターンおよび後段の変動パターンの特徴が改変されてしまうことになり、両パターンの特徴n値化処理に正確に反映できなくなる。   In such a case, if the smoothing process is performed in which the value b of the point Pb is simply set to the average value of the value a and the value c, the characteristics of the fluctuation pattern in the preceding stage and the fluctuation pattern in the subsequent stage are modified. Thus, it cannot be accurately reflected in the feature n-value conversion processing of both patterns.

そこで、図19に示すような変動パターンにおいては、点Pbの値bを、n値化処理を施した場合に「0」に圧縮される値(β)に変更するという平滑化処理を行う。ここで、「0」に圧縮される値を被圧縮値と呼称し、当該被圧縮値は、第4の閾値α4よりも小さく、0以上の固定された値に設定する。この処理により、前段の変動パターンおよび後段の変動パターンの特徴を損なうことなく、両パターンの特徴をn値化処理に正確に反映することが可能となる。   Therefore, in the variation pattern as shown in FIG. 19, a smoothing process is performed in which the value b of the point Pb is changed to a value (β) that is compressed to “0” when the n-value conversion process is performed. Here, a value compressed to “0” is referred to as a compressed value, and the compressed value is set to a fixed value that is smaller than the fourth threshold value α4 and equal to or greater than zero. By this processing, it is possible to accurately reflect the features of both patterns in the n-value conversion processing without impairing the features of the preceding and following variation patterns.

なお、被圧縮値を0に設定する場合、後段の変動パターンの平滑化に点Pbの被圧縮値を使用すると、後段の変動パターンの特徴が若干変わってしまうが、それを問題にしないのであれば、被圧縮値を0に設定しても良い。   Note that when the compressed value is set to 0, if the compressed value at the point Pb is used for smoothing the subsequent fluctuation pattern, the characteristics of the subsequent fluctuation pattern will slightly change, but this is not a problem. For example, the compressed value may be set to 0.

次に、図20〜図23に示す射影データの変動パターンの具体例を用いて、水平方向ブロック射影データ平滑化部53における平滑化処理による効果を説明する。   Next, the effect of the smoothing process in the horizontal block projection data smoothing unit 53 will be described using specific examples of the variation pattern of the projection data shown in FIGS.

図20は、平滑化処理を施さない場合の水平方向ブロック射影データの波形の一部である。図20に示すように、当該波形は、隣り合う各点で上下振動する波形である。   FIG. 20 shows a part of the waveform of horizontal block projection data when smoothing processing is not performed. As shown in FIG. 20, the waveform is a waveform that vibrates up and down at each adjacent point.

この振動の原因としては、前段回路における各種信号処理によるものの他、水平方向に限って言えば、例えば、カメラ信号などでライン毎に信号レベルが微妙に変動している場合に、それが、射影処理を行う毎に加算(強調)されて顕著化したことが考えられる。   The cause of this vibration is not only due to various signal processing in the previous stage circuit, but also in the horizontal direction, for example, when the signal level slightly varies from line to line in the camera signal etc. It is conceivable that the addition (emphasis) is made remarkable each time processing is performed.

図21は、図20に示した射影データに、3値化処理を行う場合の閾値αおよび−αを設定した状態を模式的に示す図であり、丸囲みした領域の各点で閾値を上下することが判る。従って、このまま3値化処理を行うと、3値化結果に大きな影響を与えることになる。   FIG. 21 is a diagram schematically showing a state in which threshold values α and −α are set for the projection data shown in FIG. 20 when the ternarization process is performed. The threshold values are increased and decreased at each point in a circled area. I know that Therefore, if the ternarization process is performed as it is, the ternarization result is greatly affected.

ここで、図16〜図19を用いて説明した平滑化処理を、図20に示した射影データに施した結果を図22に示す。   Here, FIG. 22 shows the result of applying the smoothing processing described with reference to FIGS. 16 to 19 to the projection data shown in FIG.

図22においては、元の垂直方向ブロック射影データの波形の全体的な特徴を残しながら、その上に重畳されている振動が除去された波形となっている。   In FIG. 22, while maintaining the overall characteristics of the waveform of the original vertical block projection data, the waveform superimposed thereon is removed.

例えば、丸囲みした領域R11〜R15は、図21において閾値を上下する領域に含まれるデータを平滑化した領域であり、これらについては、図16および図17を用いて説明した、両隣のデータの平均値を用いる平滑化処理が施されている。   For example, the circled regions R11 to R15 are regions obtained by smoothing the data included in the region where the threshold value is raised or lowered in FIG. 21, and these are the data of the adjacent data described with reference to FIGS. A smoothing process using an average value is performed.

また、領域R10は、図21において、例えば点22、点23および点24で示されるように、点23の値が閾値αより大きく、点22および点24の値が0より小さくなるような大きな変動を有する領域であり、これらについては、図18および図19を用いて説明した、3点のうち、中央の点の値をn値化処理を施した場合に「0」に圧縮される値に変更するという平滑化処理が施されている。   Further, the region R10 is large such that the value of the point 23 is larger than the threshold value α and the values of the point 22 and the point 24 are smaller than 0, as indicated by the points 22, 23 and 24 in FIG. These are areas having fluctuations, and these are values that are compressed to “0” when the value of the central point among the three points described with reference to FIGS. 18 and 19 is subjected to n-value conversion processing. The smoothing process of changing to is performed.

以上のような平滑化処理を施すことで、閾値との交差点近傍における振動によって3値化値に大きな影響を与えることのない水平方向ブロック射影データが得られる。   By performing the smoothing process as described above, horizontal block projection data that does not significantly affect the ternary value due to vibration near the intersection with the threshold value can be obtained.

図23は、第1の水平方向ブロック射影データをn値化器504によるn値化処理後に、加算器505により、第1の閾値交差点探索部48で検出された全ての第3の閾値交差点について、各第3の閾値交差点を中心とした動きベクトル検出範囲(先に説明した±Uの範囲)で加算した水平方向ブロックn値化データの一例を図示したものである。ここで、Uは31であり、横軸の目盛り32が垂直方向動きベクトル0の位置を示している。   FIG. 23 shows all third threshold intersections detected by the first threshold intersection search unit 48 by the adder 505 after the n-value conversion processing by the n-value conversion unit 504 is performed on the first horizontal block projection data. FIG. 10 illustrates an example of horizontal block n-valued data added in a motion vector detection range (range of ± U described above) centered on each third threshold intersection. Here, U is 31 and the scale 32 on the horizontal axis indicates the position of the vertical motion vector 0.

そして、塗り潰した菱形で示されているデータが「平滑化処理なし」のデータであり、塗り潰した正方形で示されているデータが「平滑化処理あり」のデータである。   The data indicated by the filled diamonds is “no smoothing” data, and the data indicated by the filled squares is “smoothed” data.

両データによってそれぞれ表される波形のうち、「平滑化処理なし」の波形は大きく振動しており、各所で上に凸、下に凸となっている。一方で、「平滑化処理あり」の波形は元の波形の特徴を残しながらも、余計な凹凸を有していない波形となっている。   Of the waveforms represented by both data, the waveform of “no smoothing” is oscillating greatly, and is convex upward and downward in various places. On the other hand, the waveform with “smoothing process” is a waveform that does not have extra unevenness while retaining the characteristics of the original waveform.

図23においては、「平滑化処理なし」の波形、「平滑化処理あり」の波形ともに、目盛り30の位置に最大ピークがあるので、ピーク検出器507にて、動きベクトル検出範囲全体の最大ピーク位置を水平方向動きベクトルと判断する場合には、誤判定は発生しない。   In FIG. 23, both the “no smoothing” waveform and the “smoothing” waveform have a maximum peak at the position of the scale 30, so the peak detector 507 uses the maximum peak of the entire motion vector detection range. When the position is determined as a horizontal motion vector, no erroneous determination occurs.

しかし、例えば、値が負→正→負と変化する「上に凸な塊」毎にピーク位置を算出し、その「塊」毎のピーク値の大小を評価することにより、周期性画像に対する動きベクトル算出結果を排除するような信頼性評価を行い、より算出精度を高めるような方法を採る場合においては、本例の「平滑化処理なし」の波形は「信頼性なし」と評価されるが、「平滑化処理あり」の波形では、正しい垂直方向動きベクトルを算出することができる。   However, for example, by calculating the peak position for each “upward convex block” whose value changes from negative to positive to negative, and evaluating the magnitude of the peak value for each “block”, the movement of the periodic image When a reliability evaluation is performed to eliminate the vector calculation result and a method that further increases the calculation accuracy is adopted, the waveform of “no smoothing process” in this example is evaluated as “no reliability”. For the waveform “with smoothing”, a correct vertical motion vector can be calculated.

すなわち、「平滑化処理なし」の波形においては、目盛り30以外に、目盛り28、目盛り32の他、多数の位置において、「塊」が形成され、それぞれ、40、30、26という加算値を有している。本来、小さなピーク以外には唯一の大きなピークを持つべきものであり、このように、多数の位置において、同等の大きなピーク値を持つ場合には、その結果は信頼に値しない。   That is, in the waveform of “without smoothing”, in addition to the scale 30, in addition to the scale 28 and the scale 32, “lumps” are formed at a large number of positions, and each has an added value of 40, 30, and 26. is doing. Originally, it should have only one large peak other than a small peak. Thus, in the case of having a large peak value equivalent at many positions, the result is not reliable.

一方、「平滑化処理あり」の波形では、目盛り30で加算値21、目盛り42で加算値5、目盛り5で加算値3のピークを持つが、目盛り30のピークは唯一の大きなピークと判断できるため、目盛り30、すなわち、ベクトル−2を垂直方向動きベクトルと判断することができる。   On the other hand, the waveform of “with smoothing process” has a peak of the addition value 21 at the scale 30, the addition value 5 at the scale 42, and the addition value 3 at the scale 5, but the peak of the scale 30 can be determined as the only large peak. Therefore, the scale 30, that is, the vector-2 can be determined as the vertical motion vector.

ピーク検出器507で水平方向ブロック毎に算出された垂直方向動きベクトルは、順次に出力端子508を介して垂直方向動きベクトル決定部51に入力される。   The vertical motion vector calculated for each horizontal block by the peak detector 507 is sequentially input to the vertical motion vector determination unit 51 via the output terminal 508.

垂直方向動きベクトル決定部51(図6)では、水平方向ブロック垂直方向動きベクトル算出部50から順次に出力される各水平方向ブロックの垂直方向動きベクトルに基づき、画像全体の垂直方向動きベクトルが決定される。具体的には、各水平方向ブロックの垂直方向動きベクトルについてヒストグラムを作成し、ヒストグラム値の最も大きな垂直方向動きベクトルを、画面全体の垂直方向動きベクトルとするなどである。   In the vertical direction motion vector determination unit 51 (FIG. 6), the vertical direction motion vector of the entire image is determined based on the vertical direction motion vector of each horizontal direction block sequentially output from the horizontal direction block vertical direction motion vector calculation unit 50. Is done. Specifically, a histogram is created for the vertical motion vector of each horizontal block, and the vertical motion vector having the largest histogram value is used as the vertical motion vector for the entire screen.

以上説明したように、水平方向ブロック射影データ平滑化部53において、水平方向ブロック射影データの大きな傾向(特徴)を損なうことなく、水平方向ブロック射影データに重畳された変動ノイズを除去することができ、加算器505での加算結果として余計なピークを発生させることがないため、ピーク検出部507における誤判定と信頼性低下を軽減することができる。結果、信頼性のある水平方向ブロック垂直方向動きベクトルを算出することができる。   As described above, the horizontal block projection data smoothing unit 53 can remove the fluctuation noise superimposed on the horizontal block projection data without impairing a large tendency (feature) of the horizontal block projection data. Since an extra peak is not generated as an addition result in the adder 505, an erroneous determination and a decrease in reliability in the peak detector 507 can be reduced. As a result, a reliable horizontal block vertical motion vector can be calculated.

<効果>
以上に説明したように、実施の形態1に係る動きベクトル検出装置1の水平方向動きベクトル検出部2においては、垂直方向ブロック射影データ平滑化部34において、垂直方向ブロック射影データの大局的な傾向(特徴)を損なうことなく、重畳された局所的な変動ノイズを除去することができるため、信頼性のある垂直方向ブロック水平方向動きベクトルを検出することができる。その結果、信頼性の高い垂直方向ブロック水平方向動きベクトルに基づいて画像全体の水平方向動きベクトルを決定することが可能となる。
<Effect>
As described above, in the horizontal direction motion vector detection unit 2 of the motion vector detection device 1 according to the first embodiment, the vertical direction block projection data smoothing unit 34 performs a general trend of the vertical direction block projection data. Since the superimposed local fluctuation noise can be removed without impairing (features), a reliable vertical block horizontal motion vector can be detected. As a result, the horizontal motion vector of the entire image can be determined based on the highly reliable vertical block horizontal motion vector.

また、垂直方向動きベクトル検出部4においては、水平方向ブロック射影データ平滑化部53において、水平方向ブロック射影データの大局的な傾向(特徴)を損なうことなく、重畳された局所的な変動ノイズを除去することができるため、信頼性のある水平方向ブロック垂直方向動きベクトルを検出することができる。その結果、信頼性の高い水平方向ブロック垂直方向動きベクトルに基づいて画像全体の垂直方向動きベクトルを決定することが可能となる。   In the vertical direction motion vector detection unit 4, the horizontal direction block projection data smoothing unit 53 generates superimposed local fluctuation noise without impairing the general tendency (feature) of the horizontal direction block projection data. Since it can be removed, a reliable horizontal block vertical motion vector can be detected. As a result, the vertical motion vector of the entire image can be determined based on the highly reliable horizontal block vertical motion vector.

また、動きベクトル検出装置1のビット数削減部25では、第1の垂直方向ブロック射影データ最大値保存部24で求められた現フレームの垂直方向射影データの最大値に基づき現フレームの垂直方向射影データのビット数を削減するため、以降の処理における演算量を抑制でき、動きベクトルの検出を一層迅速に行える。   In addition, the bit number reduction unit 25 of the motion vector detection device 1 performs vertical projection of the current frame based on the maximum value of the vertical projection data of the current frame obtained by the first vertical block projection data maximum value storage unit 24. Since the number of data bits is reduced, the amount of calculation in the subsequent processing can be suppressed, and the motion vector can be detected more quickly.

また、動きベクトル検出装置1では、前フレームに関する第2の垂直方向ブロック射影データの最大値を求め、この最大値に基づき第1の閾値α1を設定するため、適切な第1の閾値交差点を設定できる。同様に、前フレームに関する第2の水平方向ブロック射影データの最大値を求め、この最大値に基づき第3の閾値α3を設定するため、適切な第3の閾値交差点を設定できる。   Further, in the motion vector detection device 1, an appropriate first threshold value intersection is set in order to obtain the maximum value of the second vertical block projection data regarding the previous frame and to set the first threshold value α1 based on this maximum value. it can. Similarly, since the maximum value of the second horizontal block projection data regarding the previous frame is obtained and the third threshold value α3 is set based on this maximum value, an appropriate third threshold value intersection can be set.

また、動きベクトル検出装置1では、垂直方向画像分割部21でフレーム画像を垂直方向に分割した後に、各分割画像(垂直方向ブロック)について垂直方向のエッジを強調するため、垂直方向のエッジが強調された分割画像を簡易に生成できる。同様に、水平方向画像分割部41でフレーム画像を水平方向に分割した後に、各分割画像(水平方向ブロック)について水平方向のエッジを強調するため、水平方向のエッジが強調された分割画像を簡易に生成できる。   Further, in the motion vector detection device 1, the vertical image is divided by the vertical image dividing unit 21 and then the vertical edge of each divided image (vertical block) is emphasized. Therefore, the vertical edge is emphasized. The divided image can be easily generated. Similarly, after the frame image is divided in the horizontal direction by the horizontal image dividing unit 41, the horizontal edge of each divided image (horizontal block) is emphasized. Therefore, the divided image in which the horizontal edge is emphasized is simplified. Can be generated.

また、動きベクトル検出装置1では、垂直方向ブロック水平方向動きベクトル算出部31のn値化器314において垂直方向ブロック射影データ読み出し部30で読み出された射影データをn値化するため、以降の演算量を低減でき、動きベクトルの検出をより迅速に行える。特に、n値化器314では、現フレームの垂直方向ブロック射影データの最大値に基づき設定される第2の閾値α2に基づき3値化するため、ダイナミックレンジを比較的大きく確保しつつ、リアルタイム処理可能な動きベクトル検出が実現できる。また、メモリも大幅に削減することができる。   Further, in the motion vector detection device 1, the n-value generator 314 of the vertical block horizontal motion vector calculation unit 31 converts the projection data read by the vertical block projection data reading unit 30 into n-values. The amount of calculation can be reduced, and motion vectors can be detected more quickly. In particular, since the n-value converter 314 performs ternarization based on the second threshold value α2 set based on the maximum value of the vertical block projection data of the current frame, real-time processing is performed while ensuring a relatively large dynamic range. Possible motion vector detection can be realized. Also, the memory can be greatly reduced.

同様に、水平方向ブロック垂直方向動きベクトル算出部50のn値化器504において水平方向ブロック射影データ読み出し部49で読み出された射影データをn値化するため、以降の演算量を低減でき、動きベクトルの検出をより迅速に行える。特に、n値化器504では、前フレームの水平方向ブロック射影データの最大値に基づき設定される第4の閾値α4に基づき3値化するため、適切な第4の閾値α4を設定でき、ダイナミックレンジを大きく損なうことなく、リアルタイム処理可能な動きベクトル検出が実現できる。また、メモリも大幅に削減することができる。   Similarly, since the projection data read out by the horizontal block projection data reading unit 49 is converted into n values in the n-value converter 504 of the horizontal block vertical motion vector calculation unit 50, the subsequent calculation amount can be reduced. The motion vector can be detected more quickly. In particular, since the n-value converter 504 performs ternarization based on the fourth threshold value α4 set based on the maximum value of the horizontal block projection data of the previous frame, an appropriate fourth threshold value α4 can be set, and dynamic Motion vector detection capable of real-time processing can be realized without greatly degrading the range. Also, the memory can be greatly reduced.

<実施の形態2>
<動きベクトル検出装置の構成>
本発明の実施の形態2に係る動きベクトル検出装置1Aについては、図1に示す実施の形態1の動きベクトル検出装置1と類似の構成を有しているが、水平方向動きベクトル検出部と垂直方向動きベクトル検出部との構成が異なっている。この動きベクトル検出装置1Aにおける水平方向動きベクトル検出部2Aおよび垂直方向動きベクトル検出部4Aの構成について図24および図25を参照して説明する。
<Embodiment 2>
<Configuration of motion vector detection device>
The motion vector detection device 1A according to the second embodiment of the present invention has a configuration similar to that of the motion vector detection device 1 according to the first embodiment shown in FIG. 1, but is perpendicular to the horizontal motion vector detection unit. The configuration differs from that of the directional motion vector detection unit. The configuration of the horizontal direction motion vector detection unit 2A and the vertical direction motion vector detection unit 4A in the motion vector detection device 1A will be described with reference to FIGS.

図24は、水平方向動きベクトル検出部2Aの要部構成を示すブロック図である。なお、図24では、実施の形態1と同様の機能を有する部位には同一の符号を付している。   FIG. 24 is a block diagram showing a main configuration of the horizontal direction motion vector detection unit 2A. In FIG. 24, parts having the same functions as those in the first embodiment are denoted by the same reference numerals.

水平方向動きベクトル検出部2Aでは、実施の形態1の水平方向動きベクトル検出部2に対して垂直方向画像分割部21と垂直方向エッジ抽出フィルタリング部22との配置が逆転している。以下では、この水平方向動きベクトル検出部2Aの動作について説明する。   In the horizontal direction motion vector detection unit 2A, the arrangement of the vertical direction image division unit 21 and the vertical direction edge extraction filtering unit 22 is reversed with respect to the horizontal direction motion vector detection unit 2 of the first embodiment. Below, operation | movement of this horizontal direction motion vector detection part 2A is demonstrated.

図2に示すように水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像が、水平方向動きベクトル検出部2Aの入力端子20に入力されると、垂直方向エッジ抽出フィルタリング部22において垂直方向に延びるエッジ成分の抽出、換言すれば水平方向に急峻に変化する画像部分を強調するようなフィルタリング処理が施される。   As shown in FIG. 2, when a frame image read by sequentially repeating pixel scanning of the horizontal line in the vertical direction is input to the input terminal 20 of the horizontal motion vector detection unit 2A, the vertical edge extraction filtering unit 22 Extraction of edge components extending in the vertical direction, in other words, filtering processing for emphasizing image portions that change sharply in the horizontal direction is performed.

垂直方向エッジ抽出フィルタリング部22で垂直方向のエッジが強調されたフレーム画像が垂直方向画像分割部21に入力されると、垂直方向にブロック分割される。すなわち、垂直方向画像分割部21では、エッジ強調が施されたフレーム画像を垂直方向に分割して得られる複数の画像領域(垂直方向ブロック)が設定される。これにより、以降の処理では、垂直方向ブロック毎に処理および管理が行われることとなる。   When the frame image in which the vertical edge is emphasized by the vertical edge extraction filtering unit 22 is input to the vertical image dividing unit 21, it is divided into blocks in the vertical direction. That is, the vertical image dividing unit 21 sets a plurality of image regions (vertical blocks) obtained by dividing the frame image subjected to edge enhancement in the vertical direction. Thereby, in the subsequent processing, processing and management are performed for each vertical block.

垂直方向画像分割部21で分割された画像データは、垂直方向ブロック射影部23に入力されるが、この垂直方向ブロック射影部23以降の処理は、実施の形態1の水平方向動きベクトル検出部2と同様の処理が行われる。   The image data divided by the vertical image dividing unit 21 is input to the vertical block projecting unit 23. The processes after the vertical block projecting unit 23 are the horizontal direction motion vector detecting unit 2 of the first embodiment. The same processing is performed.

図25は、垂直方向動きベクトル検出部4Aの要部構成を示すブロック図である。なお、図25では、実施の形態1と同様の機能を有する部位には同一の符号を付している。   FIG. 25 is a block diagram showing a main configuration of the vertical motion vector detection unit 4A. In FIG. 25, parts having the same functions as those in the first embodiment are denoted by the same reference numerals.

垂直方向動きベクトル検出部4Aでは、実施の形態1の垂直方向動きベクトル検出部4に対して水平方向画像分割部41と水平方向エッジ抽出フィルタリング部42との配置が逆転している。以下では、この垂直方向動きベクトル検出部4Aの動作について説明する。   In the vertical direction motion vector detection unit 4A, the arrangement of the horizontal direction image division unit 41 and the horizontal direction edge extraction filtering unit 42 is reversed with respect to the vertical direction motion vector detection unit 4 of the first embodiment. Hereinafter, the operation of the vertical motion vector detection unit 4A will be described.

図2に示すように水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像が、垂直方向動きベクトル検出部4Aの入力端子40に入力されると、水平方向エッジ抽出フィルタリング部42において水平方向に延びるエッジ成分の抽出、換言すれば垂直方向に急峻に変化する画像部分を強調するようなフィルタリング処理が施される。   As shown in FIG. 2, when a frame image read out by repeating the pixel scanning of the horizontal line in order in the vertical direction is input to the input terminal 40 of the vertical direction motion vector detection unit 4A, the horizontal direction edge extraction filtering unit 42 Extraction of the edge component extending in the horizontal direction, in other words, filtering processing for emphasizing an image portion that changes sharply in the vertical direction is performed.

水平方向エッジ抽出フィルタリング部42で水平方向のエッジが強調されたフレーム画像が水平方向画像分割部41に入力されると、水平方向にブロック分割される。すなわち、水平方向画像分割部41では、エッジ強調が施されたフレーム画像を水平方向に分割して得られる複数の画像領域(水平方向ブロック)が設定される。これにより、以降の処理では、水平方向ブロック毎に処理および管理が行われることとなる。   When the frame image in which the edge in the horizontal direction is emphasized by the horizontal edge extraction filtering unit 42 is input to the horizontal direction image dividing unit 41, it is divided into blocks in the horizontal direction. That is, the horizontal image dividing unit 41 sets a plurality of image regions (horizontal blocks) obtained by dividing the frame image subjected to edge enhancement in the horizontal direction. Thereby, in subsequent processing, processing and management are performed for each horizontal block.

水平方向画像分割部41で分割された画像データは、水平方向ブロック射影部43に入力されるが、この水平方向ブロック射影部43以降の処理は、実施の形態1の垂直方向動きベクトル検出部4と同様の処理が行われる。   The image data divided by the horizontal image dividing unit 41 is input to the horizontal block projecting unit 43. The processing after the horizontal block projecting unit 43 is the vertical motion vector detecting unit 4 of the first embodiment. The same processing is performed.

以上の動きベクトル検出装置1Aの動作により、実施の形態1と同様の効果を奏する。   The operation of the motion vector detection device 1A described above provides the same effects as those of the first embodiment.

そして、動きベクトル検出装置1Aでは、垂直方向エッジ抽出フィルタリング部22でフレーム画像に対する垂直方向のエッジを強調した後に、エッジ強調されたフレーム画像を垂直方向画像分割部21において垂直方向に分割するため、垂直方向のエッジが強調された分割画像を簡易に生成できる。   Then, in the motion vector detection device 1A, the vertical edge extraction filtering unit 22 emphasizes the edge in the vertical direction with respect to the frame image, and then the vertical image dividing unit 21 divides the frame image subjected to edge enhancement in the vertical direction. A divided image with emphasized vertical edges can be easily generated.

同様に、水平方向エッジ抽出フィルタリング部42でフレーム画像に対する水平方向のエッジを強調した後に、エッジ強調されたフレーム画像を水平方向画像分割部41において水平方向に分割するため、水平方向のエッジが強調された分割画像を簡易に生成できる。   Similarly, the horizontal edge extraction filtering unit 42 emphasizes the horizontal edge of the frame image, and then the edge-enhanced frame image is divided in the horizontal direction by the horizontal image dividing unit 41. Therefore, the horizontal edge is emphasized. The divided image can be easily generated.

なお、動きベクトル検出装置1Aにおいては、垂直方向エッジ抽出フィルタリング部22と水平方向エッジ抽出フィルタリング部42とを別々に水平方向動きベクトル検出部2Aおよび垂直方向動きベクトル検出部4Aに配置するのは必須でなく、垂直方向エッジ抽出フィルタリング部22および水平方向エッジ抽出フィルタリング部42の双方の機能を一体化した水平/垂直方向エッジ抽出フィルタリング部を設けて、その出力を垂直方向画像分割部21および水平方向画像分割部41ぞれぞれに入力させるようにしても良い。   In the motion vector detection device 1A, it is essential to arrange the vertical edge extraction filtering unit 22 and the horizontal edge extraction filtering unit 42 separately in the horizontal motion vector detection unit 2A and the vertical motion vector detection unit 4A. In addition, a horizontal / vertical edge extraction filtering unit in which the functions of both the vertical edge extraction filtering unit 22 and the horizontal edge extraction filtering unit 42 are integrated is provided, and the output is provided to the vertical image dividing unit 21 and the horizontal direction. Each of the image division units 41 may be input.

<変形例>
上記の各実施の形態における垂直方向エッジ抽出フィルタリング部および水平方向エッジ抽出フィルタリング部については、エッジ抽出を行うフィルタリング処理後に、所定の閾値との大小関係を判別する閾値処理により例えば「エッジあり」「エッジなし」の2値化や、「正のエッジあり」「エッジなし」「負のエッジあり」の3値化を行うようにしても良い。このような閾値処理を行うことにより、所定の閾値以上の輝度変化(輝度勾配)を有するエッジを同一に扱うことが可能となる。
<Modification>
For the vertical direction edge extraction filtering unit and the horizontal direction edge extraction filtering unit in each of the above embodiments, after the filtering process for performing edge extraction, for example, “with edge” and “ The binarization of “no edge” or the ternarization of “with positive edge”, “without edge”, and “with negative edge” may be performed. By performing such threshold processing, it is possible to treat edges having a luminance change (luminance gradient) equal to or greater than a predetermined threshold in the same way.

上記の各実施の形態においては、ビット数削減部25から出力されるデータを、例えばフレーム毎のスイッチ切替えによって第1の垂直方向ブロック射影ラインメモリ26と第2の垂直方向ブロック射影ラインメモリ27とに交互に入力させるようにしても良い。   In each of the above-described embodiments, the data output from the bit number reduction unit 25 is converted into the first vertical block projection line memory 26 and the second vertical block projection line memory 27 by, for example, switch switching for each frame. You may make it input alternately.

また、水平方向ブロック射影部43から出力されるデータを、例えばフレームごとのスイッチ切替えによって第1の水平方向ブロック射影ラインメモリ44と第2の水平方向ブロック射影ラインメモリ46とに交互に入力させるようにしても良い。   Further, the data output from the horizontal block projection unit 43 is alternately input to the first horizontal block projection line memory 44 and the second horizontal block projection line memory 46 by, for example, switch switching for each frame. Anyway.

同様に、垂直(水平)方向ブロック射影部から出力されるデータを、例えばフレーム毎のスイッチ切替えによって第1の垂直(水平)方向ブロック射影データ最大値保存部と第2の垂直(水平)方向ブロック射影データ最大値保存部とに交互に入力させるようにしても良い。   Similarly, the data output from the vertical (horizontal) direction block projection unit is converted into, for example, a first vertical (horizontal) direction block projection data maximum value storage unit and a second vertical (horizontal) direction block by switching switches for each frame. Alternatively, the data may be alternately input to the projection data maximum value storage unit.

本発明における「前フレーム」には、後フレーム(例えば現在のフレーム)に対して1つだけ前のフレームに限らず、2つ以上前のフレームも含まれる。例えば、フレーム間引き処理により途中のフレームがスキップされている場合には、スキップされたフレームの前のフレームが含まれる。   The “previous frame” in the present invention is not limited to the previous frame, but includes two or more previous frames. For example, when a frame in the middle is skipped by the frame thinning process, the frame before the skipped frame is included.

本発明の実施の形態1に係る動きベクトル検出装置1(1A)の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of the motion vector detection apparatus 1 (1A) which concerns on Embodiment 1 of this invention. フレーム画像における画素走査方向を説明するための図である。It is a figure for demonstrating the pixel scanning direction in a frame image. 水平方向動きベクトル検出部2の要部構成を示すブロック図である。3 is a block diagram showing a main configuration of a horizontal motion vector detection unit 2. FIG. 垂直方向ブロック射影部23の要部構成を示すブロック図である。FIG. 4 is a block diagram showing a main configuration of a vertical block projection unit 23. 垂直方向ブロック水平方向動きベクトル算出部31の要部構成を示すブロック図である。FIG. 6 is a block diagram showing a main configuration of a vertical block horizontal motion vector calculation unit 31. 垂直方向動きベクトル検出部4の要部構成を示すブロック図である。FIG. 3 is a block diagram illustrating a main configuration of a vertical motion vector detection unit 4. 水平方向ブロック射影部43の要部構成を示すブロック図である。FIG. 4 is a block diagram illustrating a main configuration of a horizontal block projection unit 43. 水平方向ブロック垂直方向動きベクトル算出部50の要部構成を示すブロック図である。FIG. 6 is a block diagram showing a main configuration of a horizontal block vertical motion vector calculation unit 50. 垂直方向画像分割部21および垂直方向ブロック射影部23の動作を説明するための図である。It is a figure for demonstrating operation | movement of the vertical direction image division part 21 and the vertical direction block projection part 23. FIG. n値化器314(504)におけるn値化処理を説明するための図である。It is a figure for demonstrating the n-value conversion process in the n-value conversion device 314 (504). 第1の閾値交差点探索部29、垂直方向ブロック射影データ読み出し部30および垂直方向ブロック水平方向動きベクトル算出部31の動作を説明するための図である。It is a figure for demonstrating operation | movement of the 1st threshold value intersection search part 29, the vertical direction block projection data reading part 30, and the vertical direction block horizontal direction motion vector calculation part 31. FIG. 加算器315およびピーク検出部317の動作を説明するための図である。6 is a diagram for explaining operations of an adder 315 and a peak detector 317. FIG. 水平方向画像分割部41および水平方向ブロック射影部43の動作を説明するための図である。It is a figure for demonstrating operation | movement of the horizontal direction image division part 41 and the horizontal direction block projection part 43. FIG. 第3の閾値交差点探索部48、水平方向ブロック射影データ読み出し部49および水平方向ブロック垂直方向動きベクトル算出部50の動作を説明するための図である。It is a figure for demonstrating operation | movement of the 3rd threshold value intersection search part 48, the horizontal direction block projection data reading part 49, and the horizontal direction block vertical direction motion vector calculation part 50. FIG. 加算器505およびピーク検出部507の動作を説明するための図である。FIG. 10 is a diagram for explaining operations of an adder 505 and a peak detection unit 507. 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための図である。It is a figure for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための図である。It is a figure for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための図である。It is a figure for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための図である。It is a figure for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための射影データ波形の一例を示す図である。It is a figure which shows an example of the projection data waveform for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための射影データ波形の一例を示す図である。It is a figure which shows an example of the projection data waveform for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を説明するための射影データ波形の一例を示す図である。It is a figure which shows an example of the projection data waveform for demonstrating the smoothing process in the vertical direction block projection data smoothing part 34 (horizontal direction block projection data smoothing part 53). 垂直方向ブロック射影データ平滑化部34(水平方向ブロック射影データ平滑化部53)における平滑化処理を行った場合と行わなかった場合の垂直方向ブロックn値化データ(水平方向ブロックn値化データ)の波形の一例を示す図である。Vertical block n-valued data (horizontal block n-valued data) when smoothing processing is performed in the vertical block projection data smoothing unit 34 (horizontal block projection data smoothing unit 53) It is a figure which shows an example of this waveform. 本発明の実施の形態2に係る動きベクトル検出装置1Aにおける水平方向動きベクトル検出部2Aの要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of 2 A of horizontal direction motion vector detection parts in 1 A of motion vector detection apparatuses which concern on Embodiment 2 of this invention. 動きベクトル検出装置1Aにおける垂直方向動きベクトル検出部4Aの要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of 4 A of vertical direction motion vector detection parts in 1 A of motion vector detection apparatuses.

符号の説明Explanation of symbols

1,1A 動きベクトル検出装置、hb0〜hb9 水平方向ブロック、hn0〜hn9 水平方向ブロック射影データ、vb0〜vb7 垂直方向ブロック、vn0〜vn6 垂直方向ブロック射影データ、A(1)〜A(8) 第1の閾値交差点、α1 第1の閾値、α2 第2の閾値、B(1)〜B(6) 第3の閾値交差点、α3 第3の閾値、α4 第4の閾値。   1, 1A motion vector detection device, hb0 to hb9 horizontal block, hn0 to hn9 horizontal block projection data, vb0 to vb7 vertical block, vn0 to vn6 vertical block projection data, A (1) to A (8) 1 threshold intersection, α1 first threshold, α2 second threshold, B (1) to B (6) third threshold intersection, α3 third threshold, α4 fourth threshold.

Claims (12)

時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルを検出する動きベクトル検出装置であって、
水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像に関して、前記フレーム画像における所定の画像領域について垂直方向のエッジを強調するエッジ強調手段と、
前記エッジ強調手段でエッジが強調された画像について垂直方向に射影をとり、1水平ライン分のデータ配列を有する射影データを生成する射影手段と、
前記射影データに重畳された変動ノイズを除去して平滑化射影データを得る平滑化手段と、
前記前フレームに対して前記平滑化射影データに関して、前記データ配列の要素順に配列要素の値をグラフ化した波形と、配列要素の値が所定の一定値となる直線とが交差する各交差点の配列要素の位置を特定する特定手段と、
前記各交差点の配列要素の位置を中心とした所定範囲のデータ配列を、前記後フレームに対して前記平滑化射影データから抽出する抽出手段と、
前記抽出手段で抽出された所定範囲のデータ配列それぞれについて、前記各交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値を加算する加算手段と、
前記加算手段で加算された加算結果に基づき、前記フレーム画像の所定の画像領域についての水平方向動きベクトルを検出する検出手段と、を備える、動きベクトル検出装置。
A motion vector detection device that detects a motion vector between frame images related to a preceding frame and a following frame that are in a time series front-rear relationship,
With respect to a frame image read out by repeating pixel scanning of a horizontal line in order in the vertical direction, edge enhancement means for enhancing a vertical edge for a predetermined image region in the frame image;
Projecting means for projecting the image in which the edge is enhanced by the edge enhancement means in the vertical direction and generating projection data having a data array for one horizontal line;
Smoothing means for obtaining smoothed projection data by removing fluctuation noise superimposed on the projection data;
With respect to the smoothed projection data with respect to the previous frame, an array of intersections at which a waveform obtained by graphing array element values in the order of the elements of the data array intersects with a straight line where the array element values are a predetermined constant value. A identifying means for locating the element;
Extraction means for extracting a predetermined range of data array centered on the position of the array element at each intersection from the smoothed projection data for the subsequent frame;
For each data array in a predetermined range extracted by the extracting means, an adding means for adding values of array elements having the same relative position to the position of the array element at each intersection;
A motion vector detection device comprising: detection means for detecting a horizontal motion vector for a predetermined image area of the frame image based on the addition result added by the addition means.
時系列的に前後の関係となる前フレームと後フレームとに関するフレーム画像間の動きベクトルを検出する動きベクトル検出装置であって、
水平ラインの画素走査を垂直方向に順に繰り返すことによって読み出されるフレーム画像に関して、前記フレーム画像における所定の画像領域について水平方向のエッジを強調するエッジ強調手段と、
前記エッジ強調手段でエッジが強調された画像について水平方向に射影をとり、1垂直ライン分のデータ配列を有する射影データを生成する射影手段と、
前記射影データに重畳された変動ノイズを除去して平滑化射影データを得る平滑化手段と、
前記前フレームに対して前記平滑化射影データに関して前記データ配列の要素順に配列要素の値をグラフ化した波形と、配列要素の値が所定の一定値となる直線とが交差する各交差点の配列要素の位置を特定する特定手段と、
前記各交差点の配列要素の位置を中心とした所定範囲のデータ配列を、前記後フレームに対して前記平滑化射影データから抽出する抽出手段と、
前記抽出手段で抽出された所定範囲のデータ配列それぞれについて、前記各交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値を加算する加算手段と、
前記加算手段で加算された加算結果に基づき、前記フレーム画像の所定の画像領域についての垂直方向動きベクトルを検出する検出手段と、を備える、動きベクトル検出装置。
A motion vector detection device that detects a motion vector between frame images related to a preceding frame and a following frame that are in a time series front-rear relationship,
With respect to a frame image that is read out by repeating pixel scanning of a horizontal line in order in the vertical direction, edge enhancement means that enhances a horizontal edge for a predetermined image region in the frame image;
Projecting means for projecting in the horizontal direction the image whose edges are emphasized by the edge enhancement means and generating projection data having a data array for one vertical line;
Smoothing means for obtaining smoothed projection data by removing fluctuation noise superimposed on the projection data;
An array element at each intersection where a waveform obtained by graphing array element values in the order of elements of the data array with respect to the smoothed projection data with respect to the previous frame intersects with a straight line where the array element value is a predetermined constant value A specifying means for specifying the position of
Extraction means for extracting a predetermined range of data array centered on the position of the array element at each intersection from the smoothed projection data for the subsequent frame;
For each data array in a predetermined range extracted by the extracting means, an adding means for adding values of array elements having the same relative position to the position of the array element at each intersection;
A motion vector detection device comprising: detection means for detecting a vertical motion vector for a predetermined image region of the frame image based on the addition result added by the addition means.
前記前フレームに関する射影データの配列要素において最大値を求める最大値特定手段、をさらに備え、
前記所定の一定値は、前記最大値特定手段で求められた最大値に基づき設定される、請求項1または請求項2に記載の動きベクトル検出装置。
Maximum value specifying means for obtaining a maximum value in an array element of projection data relating to the previous frame,
The motion vector detection device according to claim 1, wherein the predetermined constant value is set based on a maximum value obtained by the maximum value specifying unit.
前記抽出手段で抽出された所定範囲のデータ配列に関する各配列要素のデータ長を圧縮する圧縮手段、をさらに備え、
前記加算手段は、
前記圧縮手段によりデータ長が圧縮された所定範囲のデータ配列それぞれについて、前記各交差点の配列要素の位置に対して相対位置が同じ配列要素同士の値を加算する手段を有する 請求項1または請求項2に記載の動きベクトル検出装置。
Compression means for compressing the data length of each array element relating to the data array in a predetermined range extracted by the extraction means,
The adding means includes
The means for adding the values of array elements having the same relative position to the position of the array element at each intersection for each data array in a predetermined range whose data length is compressed by the compression means. 3. The motion vector detection device according to 2.
前記圧縮手段は、
前記抽出手段で抽出された所定範囲のデータ配列に関する各配列要素の値を3値化処理する手段を有し、
前記3値化処理では、前記後フレームの射影データ、ないしは、前記前フレームの射影データにおける配列要素の最大値に基づき設定される閾値Th(Th>0)に関して、前記抽出手段で抽出された射影データに関する配列要素の値が、(−Th)より小さい場合、(−Th)以上でTh以下の場合、およびThより大きい場合の3段階による3値化が行われる、請求項4記載の動きベクトル検出装置。
The compression means includes
Means for ternarizing the value of each array element relating to the data array in a predetermined range extracted by the extraction means;
In the ternary processing, the projection extracted by the extraction unit with respect to the projection data of the subsequent frame or the threshold Th (Th> 0) set based on the maximum value of the array element in the projection data of the previous frame. The motion vector according to claim 4, wherein three-level ternarization is performed when a value of an array element related to data is smaller than (−Th), when it is greater than (−Th) and smaller than or equal to Th, and larger than Th. Detection device.
前記平滑化手段は、
前記射影データに関して前記データ配列の要素順に配列要素の値をグラフ化した波形について、連続する3個の配列要素に基づいて平滑化処理を実行し、
前記平滑化処理は、
前記3個の配列要素が何れも正の値であって、下に凸のパターンを形成する場合、中心の配列要素の値を、前後の配列要素の平均値に変更し、
前記3個の配列要素が何れも負の値であって、上に凸のパターンを形成する場合、前記中心の配列要素の値を、前記前後の配列要素の平均値に変更する処理を含む、請求項1または請求項2に記載の動きベクトル検出装置。
The smoothing means includes
For a waveform obtained by graphing array element values in the order of elements of the data array with respect to the projection data, a smoothing process is executed based on three consecutive array elements,
The smoothing process is
When the three array elements are all positive values and form a downwardly convex pattern, the value of the center array element is changed to the average value of the preceding and following array elements,
Including a process of changing the value of the central array element to the average value of the preceding and following array elements when the three array elements are all negative values and form an upwardly convex pattern, The motion vector detection apparatus according to claim 1 or 2.
前記平滑化処理は、
前記3個の配列要素が、正、零、正の値であって、下に凸のパターンを形成する場合、前記中心の配列要素の値を、前記前後の配列要素の平均値に変更し、
前記3個の配列要素が、負、零、負の値であって、上に凸のパターンを形成する場合、前記中心の配列要素の値を、前記前後の配列要素の平均値に変更する処理を含む、請求項1または請求項2に記載の動きベクトル検出装置。
The smoothing process is
When the three array elements are positive, zero, and positive values and form a downward convex pattern, the value of the central array element is changed to the average value of the array elements before and after,
When the three array elements are negative, zero, and negative values and form an upwardly convex pattern, the process of changing the value of the central array element to the average value of the preceding and following array elements The motion vector detection device according to claim 1, comprising:
前記平滑化手段は、
前記射影データに関して前記データ配列の要素順に配列要素の値をグラフ化した波形について、連続する3個の配列要素に基づいて平滑化処理を実行し、
前記平滑化処理は、
前記3個の配列要素が、正、負、正の値であって、下に凸のパターンを形成する場合、前記中心の配列要素の値を、前記圧縮手段において、零に圧縮される値に変更し、
前記3個の配列要素が、負、正、負の値であって、上に凸のパターンを形成する場合、前記中心の配列要素の値を、前記圧縮手段において、零に圧縮される値に変更する処理を含む、請求項5に記載の動きベクトル検出装置。
The smoothing means includes
For a waveform obtained by graphing array element values in the order of elements of the data array with respect to the projection data, a smoothing process is executed based on three consecutive array elements,
The smoothing process is
When the three array elements are positive, negative, and positive values and form a downwardly convex pattern, the value of the central array element is set to a value that is compressed to zero by the compression means. change,
When the three array elements are negative, positive, and negative values and form an upwardly convex pattern, the value of the central array element is set to a value that is compressed to zero by the compression means. The motion vector detection device according to claim 5, comprising a process of changing.
前記エッジ強調手段は、
前記フレーム画像を垂直方向に分割して得られる複数の画像領域を、前記所定の画像領域として設定する手段と、
前記複数の画像領域それぞれについて垂直方向のエッジを強調する手段と、を有する、請求項1記載の動きベクトル検出装置。
The edge enhancement means includes
Means for setting a plurality of image areas obtained by dividing the frame image in the vertical direction as the predetermined image areas;
The motion vector detection apparatus according to claim 1, further comprising: a unit that emphasizes a vertical edge for each of the plurality of image regions.
前記エッジ強調手段は、
前記フレーム画像について垂直方向のエッジを強調する強調手段と、
前記強調手段でエッジが強調されたフレーム画像を垂直方向に分割して得られる複数の画像領域を、前記所定の画像領域として設定する手段と、を有する、請求項1記載の動きベクトル検出装置。
The edge enhancement means includes
Emphasis means for emphasizing vertical edges of the frame image;
The motion vector detection apparatus according to claim 1, further comprising: a plurality of image regions obtained by dividing a frame image whose edges are enhanced by the enhancement unit in the vertical direction as the predetermined image regions.
前記エッジ強調手段は、
前記フレーム画像を水平方向に分割して得られる複数の画像領域を、前記所定の画像領域として設定する手段と、
前記複数の画像領域それぞれについて水平方向のエッジを強調する手段と、を有する、請求項2記載の動きベクトル検出装置。
The edge enhancement means includes
Means for setting a plurality of image areas obtained by dividing the frame image in the horizontal direction as the predetermined image areas;
The motion vector detection apparatus according to claim 2, further comprising a unit that emphasizes a horizontal edge for each of the plurality of image regions.
前記エッジ強調手段は、
前記フレーム画像について水平方向のエッジを強調する強調手段と、
前記強調手段でエッジが強調されたフレーム画像を水平方向に分割して得られる複数の画像領域を、前記所定の画像領域として設定する手段と、を有する、請求項2記載の動きベクトル検出装置。
The edge enhancement means includes
Enhancing means for enhancing a horizontal edge of the frame image;
The motion vector detection device according to claim 2, further comprising: a plurality of image regions obtained by dividing a frame image whose edges are enhanced by the enhancement unit in the horizontal direction as the predetermined image regions.
JP2007009732A 2006-11-30 2007-01-19 Motion vector detection device Expired - Fee Related JP4313820B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2007009732A JP4313820B2 (en) 2007-01-19 2007-01-19 Motion vector detection device
PCT/JP2007/061723 WO2008065764A1 (en) 2006-11-30 2007-06-11 Motion vector detecting device
CN2007800365742A CN101523440B (en) 2006-11-30 2007-06-11 Motion vector detecting device
EP07745013A EP2088558B1 (en) 2006-11-30 2007-06-11 Motion vector detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007009732A JP4313820B2 (en) 2007-01-19 2007-01-19 Motion vector detection device

Publications (2)

Publication Number Publication Date
JP2008176590A JP2008176590A (en) 2008-07-31
JP4313820B2 true JP4313820B2 (en) 2009-08-12

Family

ID=39703560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007009732A Expired - Fee Related JP4313820B2 (en) 2006-11-30 2007-01-19 Motion vector detection device

Country Status (1)

Country Link
JP (1) JP4313820B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011191973A (en) * 2010-03-15 2011-09-29 Fujifilm Corp Device and method for measurement of motion vector

Also Published As

Publication number Publication date
JP2008176590A (en) 2008-07-31

Similar Documents

Publication Publication Date Title
KR101303667B1 (en) Method and apparatus for detecting and removing false contour and method and apparatus for confirming whether pixel is contour and method and apparatus for computing simplicity
US20090310882A1 (en) Method, apparatus and integrated circuit capable of reducing image ringing noise
CN109844809B (en) Image processing method and device and computer readable storage medium
JP2008009549A (en) Image processing method, image processing apparatus, and image processing program
JP6177541B2 (en) Character recognition device, character recognition method and program
JP2011509617A (en) Sparse geometry for super-resolution video processing
CN109447006A (en) Image processing method, device, equipment and storage medium
CN110555863A (en) moving object detection method and device and computer readable storage medium
Panda et al. Filtering corrupted image and edge detection in restored grayscale image using derivative filters
JP5870745B2 (en) Image processing apparatus, binarization threshold value calculation method, and computer program
JP2013122739A (en) Analysis device, analysis program and analysis method
JP4313820B2 (en) Motion vector detection device
CN104103037A (en) Image enhancement processing method and device
JP4027398B1 (en) Motion vector detection device
CN110728692A (en) Image edge detection method based on Scharr operator improvement
CN114693543B (en) Image noise reduction method and device, image processing chip and image acquisition equipment
JP4083782B1 (en) Motion vector detection device
CN110287752A (en) A kind of dot matrix code detection method and device
TWI511545B (en) Block noise detection in digital video
JP4213739B2 (en) Motion vector detection device
WO2008023466A1 (en) Moving vector detecting bdevice
WO2008065764A1 (en) Motion vector detecting device
JPH0816773A (en) Image processing method
JP5103436B2 (en) Image processing apparatus, image processing method, and image processing program
JP4025656B2 (en) Contour line segment extraction method, contour line segment extraction device, contour line segment extraction program, and recording medium recording the program

Legal Events

Date Code Title Description
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: 20090512

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

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

Free format text: PAYMENT UNTIL: 20120522

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120522

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130522

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140522

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees