JP4662969B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP4662969B2
JP4662969B2 JP2007290754A JP2007290754A JP4662969B2 JP 4662969 B2 JP4662969 B2 JP 4662969B2 JP 2007290754 A JP2007290754 A JP 2007290754A JP 2007290754 A JP2007290754 A JP 2007290754A JP 4662969 B2 JP4662969 B2 JP 4662969B2
Authority
JP
Japan
Prior art keywords
optical flow
calculation
image data
calculated
image
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
JP2007290754A
Other languages
Japanese (ja)
Other versions
JP2009116730A (en
Inventor
雅彦 吉本
勇一郎 村地
博 川口
祐貴 福山
亮 山本
吉雄 松田
正幸 深山
Original Assignee
株式会社半導体理工学研究センター
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 株式会社半導体理工学研究センター filed Critical 株式会社半導体理工学研究センター
Priority to JP2007290754A priority Critical patent/JP4662969B2/en
Publication of JP2009116730A publication Critical patent/JP2009116730A/en
Application granted granted Critical
Publication of JP4662969B2 publication Critical patent/JP4662969B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、階層化された画像データについてオプティカルフローを演算する画像処理装置及び方法に関する。   The present invention relates to an image processing apparatus and method for calculating an optical flow for layered image data.

オプティカルフローは動画像における連続2フレーム間での画素毎の動きベクトルのことであり、動画像認識処理の要素として使用される。すなわち、オプティカルフローは、画像の動きを表す画素毎の速度ベクトルで表され、この速度ベクトルを求めることにより画素の動きを検出する。白線検知や障害物認識などの車載分野、物体・動体認識やマニピュレーション用動き検出などのロボット分野、マルチメディアコンテンツ配信を高画質/高圧縮で実現するマルチメディア通信分野等における動画像認識に応用されている。特に車載やロボットでは実時間での処理が求められるため、オプティカルフロー計算の高速化は必須である。   The optical flow is a motion vector for each pixel between two consecutive frames in a moving image, and is used as an element of a moving image recognition process. That is, the optical flow is represented by a velocity vector for each pixel representing the motion of the image, and the motion of the pixel is detected by obtaining this velocity vector. Applied to in-vehicle field such as white line detection and obstacle recognition, robot field such as object / motion object recognition and motion detection for manipulation, multimedia communication field that realizes high-quality / high-compression multimedia content distribution, etc. ing. In particular, in-vehicle and robots require real-time processing, so it is essential to speed up the optical flow calculation.

従来の階層型ルーカス及びカナデ(Lucus&Kanade)法によるオプティカルフローの計算を以下に説明する。現フレームの画像をI、次フレームの画像をJとし、位置X=(x,y)での画像の輝度値をそれぞれI(x,y)、J(x,y)とする。I上の点u=(u,u)からJ上の最も類似性の高い点v=u+d=(u+d,u+d)への移動量d=(d,d)がオプティカルフローであり、次式のマッチング誤差関数を最小化するベクトルとして定義される。なお、当該明細書において、数式がイメージ入力された墨付き括弧の数番号と、数式が文字入力された大括弧の数式番号とを混在して用いており、また、当該明細書での一連の数式番号として「式(1)」の形式を用いて数式番号を式の最後部に付与して(付与していない数式も存在する)用いることとする。 The calculation of the optical flow by the conventional hierarchical Lucas & Kanade method will be described below. Assume that the current frame image is I, the next frame image is J, and the luminance values of the image at position X = (x, y) are I (x, y) and J (x, y), respectively. Movement amount d = (d x , d y ) from point u = (u x , u y ) on I to point v = u + d = (u x + d x , u y + d y ) on J ) Is an optical flow, and is defined as a vector that minimizes the matching error function of the following equation. In this specification, the number number of the black brackets in which the mathematical formula is imaged and the formula number of the square brackets in which the mathematical formula is input are used in combination. The formula number is assigned to the last part of the formula using the formula (1) as the formula number (there is also a formula that is not given).

Figure 0004662969
Figure 0004662969

ここで、マッチング誤差関数は整数のウィンドウ(2w+1,2w+1)の近傍画素について計算される。w,wの値としては、主に2、3、4、5、6、7画素が用いられる。 Here, the matching error function is calculated for neighboring pixels in an integer window (2w x +1, 2w y +1). As the values of w x and w y , 2, 3, 4, 5, 6, and 7 pixels are mainly used.

大きな動きに対しても、精度良くオプティカルフローを求めるために、図20に示すように画像を階層化することが行われている。図20において、階層レベル0が原画像に対応しており、最も解像度が高い。上位階層の輝度値は例えば図21に示すフィルタと1/2サブサンプリングによって求められる。これを下位階層から上位階層へと繰り返すことで、さらに上位の階層化画像を得る。階層数として実用的な値は2、3、4である。   In order to obtain an optical flow with high accuracy even for a large movement, the images are hierarchized as shown in FIG. In FIG. 20, layer level 0 corresponds to the original image and has the highest resolution. The luminance value of the upper layer is obtained by, for example, the filter and 1/2 subsampling shown in FIG. By repeating this from the lower hierarchy to the upper hierarchy, a higher hierarchical image is obtained. Practical values for the number of layers are 2, 3, and 4.

階層化を用いたオプティカルフロー導出では、まず最も上位の階層Lでオプティカルフローが計算される。この計算結果は、1つ下の階層Lm−1のオプティカルフローの初期値として階層Lm−1に伝搬され、さらに階層Lm−1の結果は階層Lm−2に伝搬される。これを最下位階層まで繰り返すことによって最終的なオプティカルフローを得る。上位階層で算出されたオプティカルフローgを初期予測値とすると、現階層のマッチング誤差関数は次式で定義される。 In optical flow derivation using hierarchization, first, an optical flow is calculated at the highest hierarchy L m . The calculation result is transmitted to the hierarchical L m-1 as the initial value of one optical flow hierarchy L m-1 below, more hierarchical L m-1 results are propagated to the hierarchical L m-2. A final optical flow is obtained by repeating this to the lowest hierarchy. When the optical flow g L calculated in the upper layer is an initial predicted value, the matching error function in the current layer is defined by the following equation.

Figure 0004662969
Figure 0004662969

ここで、d(残差)が現階層で求めるべきオプティカルフローとなる。上位階層で大きな動きgを計算し、現階層で小さな動きdを計算する。この残差オプティカルフローは次のレベルL−1の初期ベクトルgL−1として伝搬される。つまり上位階層で得たオプティカルフローgと現階層で得た残差オプティカルフローdを合わせたものが下位階層L−1でのフローの初期値gL−1となる。下位階層への伝搬は次式で表される。 Here, d L (residual) is an optical flow to be obtained in the current hierarchy. A large motion g L is calculated in the upper layer, and a small motion d L is calculated in the current layer. This residual optical flow is propagated as the next level L-1 initial vector g L-1 . That is, the sum of the optical flow g L obtained in the upper hierarchy and the residual optical flow d L obtained in the current hierarchy is the initial value g L-1 of the flow in the lower hierarchy L-1. Propagation to the lower layer is expressed by the following equation.

[数1]
L−1=2(g+d) (3)
[Equation 1]
g L-1 = 2 (g L + d L ) (3)

次の階層での残差オプティカルフローdL−1も上記と同様に計算され、この処理が最下位階層まで繰り返し行われ、最終的に式(1)で表されるオプティカルフローdが求められる。 The residual optical flow d L−1 in the next hierarchy is also calculated in the same manner as described above, and this process is repeatedly performed up to the lowest hierarchy to finally obtain the optical flow d represented by the equation (1).

オプティカルフローの計算では、画素毎に独立した一連の方程式を解く必要があり、CIF30fpsのシーケンスの場合、数十GOPSを超える演算量となる。このため、汎用プロセッサを用いたソフトウェア処理では、実時間処理を維持するために計算範囲を限定し、オプティカルフローの検出精度を落とす必要がある。実時間で全画面処理を高精度で行うためには専用ハードウェアが必要不可欠である。オプティカルフロープロセッサの1つであるHOEプロセッサ(例えば、非特許文献1参照。)では最高解像度CIF30fpsを達成しているが、チップ面積が大きく、コスト面での負荷が大きい。今後、動画像認識処理において、高解像度な動画像への対応が必須となるため、より高解像度対応で小チップ面積のオプティカルフロープロセッサが必要となる。   In the calculation of the optical flow, it is necessary to solve a series of independent equations for each pixel. In the case of a sequence of CIF 30 fps, the calculation amount exceeds several tens of GOPS. For this reason, in software processing using a general-purpose processor, it is necessary to limit the calculation range and maintain optical flow detection accuracy in order to maintain real-time processing. Dedicated hardware is essential to perform full-screen processing with high accuracy in real time. The HOE processor (see, for example, Non-Patent Document 1), which is one of the optical flow processors, achieves the highest resolution CIF of 30 fps, but has a large chip area and a large cost burden. In the future, in moving image recognition processing, it will be essential to support high-resolution moving images, so an optical flow processor that supports higher resolution and has a small chip area will be required.

高速のオプティカルフロープロセッサを実現するために、PLKアルゴリズムを用いることが提案されている(例えば、非特許文献2参照。)PLKアルゴリズムは、急峻な動きに対応するための階層化手法を階層型ルーカス及びカナデ(Pyramidal Lcus & Kanade)法のアルゴリズムに導入したものであり、非特許文献2で公開されている。一般的にオプティカルフローアルゴリズムでは線形近似を用いるため、大きな動きを含むシーケンスではフロー検出精度が低下する。そこで、図20に示すような階層化手法を用いることにより、大きな移動量を小さな移動量として扱うことができ、大きな動きに対応可能となる。PLKアルゴリズムは、他のアルゴリズム(例えば、非特許文献3−6参照。)と比較して、演算量が少なく、メモリ使用量が小さく、精度が高いため、本アルゴリズムはVLSIに実装するアルゴリズムとして適している。   In order to realize a high-speed optical flow processor, it has been proposed to use a PLK algorithm (see, for example, Non-Patent Document 2). The PLK algorithm uses a layered Lucas as a layering method for dealing with steep movements. And introduced in the algorithm of the Pyramidal Lcus & Kanade method. Since the optical flow algorithm generally uses linear approximation, the flow detection accuracy decreases in a sequence including a large motion. Therefore, by using a hierarchization method as shown in FIG. 20, a large movement amount can be handled as a small movement amount, and a large movement can be handled. Since the PLK algorithm has a smaller calculation amount, smaller memory usage, and higher accuracy than other algorithms (for example, see Non-Patent Documents 3-6), this algorithm is suitable as an algorithm implemented in VLSI. ing.

図22は従来技術に係るPLKアルゴリズムによるオプティカルフロー演算処理(以下、「OPF(OPtical Flow)演算」という。)を示すフローチャートである。図22において、PLKアルゴリズムによるOPF演算処理の全体処理(2つのフレームの画像データをメモリに入力した後の処理)は、公知のように、
(a)階層化画像生成演算(以下、「PIC(Pyramidal Image Creation)演算」という。)処理(ステップS2,S3)と、
(b)空間輝度勾配行列演算(以下、「SGM(Spatial Gradient Matrix)演算」という。)処理(ステップS4)と、
(c)ミスマッチベクトル演算(以下、「MMV(Mismatch Vector)」演算という。)
処理(ステップS5)と、
(d)OPF演算処理(ステップS6)とを含む。
図22において、itrは繰り返し回数のパラメータであり、itrmaxは繰り返し回数の最大値である。また、Lは階層数のパラメータであり、Lmaxは階層数の最大値である。なお、ステップS1では、これらの最大値をセットする初期化処理を行っている。
FIG. 22 is a flowchart showing an optical flow calculation process (hereinafter referred to as “OPF (OPtical Flow) calculation”) by the PLK algorithm according to the prior art. In FIG. 22, the entire processing of the OPF calculation processing by the PLK algorithm (processing after inputting the image data of two frames to the memory) is known as follows.
(A) Hierarchical image generation calculation (hereinafter referred to as “PIC (Pyramidal Image Creation) calculation”) processing (steps S2 and S3);
(B) Spatial luminance gradient matrix calculation (hereinafter referred to as “SGM (Spatial Gradient Matrix) calculation”) processing (step S4);
(C) Mismatch vector calculation (hereinafter referred to as “MMV (Mismatch Vector)” calculation)
Processing (step S5);
(D) OPF calculation processing (step S6).
In FIG. 22, itr is a parameter of the number of repetitions, and itrmax is a maximum value of the number of repetitions. L is a parameter for the number of layers, and Lmax is a maximum value for the number of layers. In step S1, initialization processing for setting these maximum values is performed.

PLKアルゴリズムにおいて、座標(x,y)のオプティカルフローであるuは次式によって計算される。   In the PLK algorithm, u which is an optical flow of coordinates (x, y) is calculated by the following equation.

[数2]
Gu=b (4)
[Equation 2]
Gu = b (4)

Figure 0004662969
Figure 0004662969
Figure 0004662969
Figure 0004662969

ここで、I,I,Iはそれぞれx方向、y方向、t方向の輝度勾配であり、G、bをそれぞれ空間輝度勾配行列、ミスマッチベクトルと呼ぶ。wは重み係数である。G、bを注目画素を中心とした小領域(ウィンドウ)内で計算し、式(4)を解くことでオプティカルフローuを得る。また、Σはウィンドウ内の画素全体における総和演算を表す。これはニュートン・ラプソン法による繰り返し処理が可能であり、求めたオプティカルフローを用いて中心画素の再定義を行い、式(4)を繰り返し計算することにより精度の高い解へと収束させることができる。 Here, I x, I y, I t is the brightness gradient of the x-direction, y-direction, t directions, respectively, G, b each spatial brightness gradient matrix, referred to as a mismatch vector. w is a weighting coefficient. Optical flow u is obtained by calculating G and b within a small region (window) centered on the pixel of interest and solving equation (4). Further, Σ represents a summation operation for all pixels in the window. This can be iteratively processed by the Newton-Raphson method, redefining the central pixel using the obtained optical flow, and can be converged to a highly accurate solution by repeatedly calculating equation (4). .

特開平11−195108号公報。Japanese Patent Application Laid-Open No. 11-195108. 特開2000−155831号公報。JP 2000-155831 A. N. Minegishi, et al., "VLSI Architecture Study of a Real-Time Scalable Optical Flow Processor for Video Segmentation", IEICE transactions on electronics, Vol.E89-C, No.3, pp.230-242, 2006.N. Minegishi, et al., "VLSI Architecture Study of a Real-Time Scalable Optical Flow Processor for Video Segmentation", IEICE transactions on electronics, Vol.E89-C, No.3, pp.230-242, 2006. Jean-Yves Bouguet, "Pyramidal Implementation of the Lucas Kanade Feature Tracker Description of the algorithm", Open CV Documentation, Intel Corporation Microprocessor Research Laboratories, 1999.Jean-Yves Bouguet, "Pyramidal Implementation of the Lucas Kanade Feature Tracker Description of the algorithm", Open CV Documentation, Intel Corporation Microprocessor Research Laboratories, 1999. T. Yamamoto et al., "Improvement of Optical Flow by Moving Object Detection using Temporal Correlation", Transactions IIITE, Vol.55, No.6, pp.907-911, 2001.T. Yamamoto et al., "Improvement of Optical Flow by Moving Object Detection using Temporal Correlation", Transactions IIITE, Vol.55, No.6, pp.907-911, 2001. B.K.P. Horn et al., "Determining Optical Flow, Artificial Intelligence", Vol.17, pp.185-204, 1981.B.K.P.Horn et al., "Determining Optical Flow, Artificial Intelligence", Vol.17, pp.185-204, 1981. J.L. Barron et al., "Performance of Optical Flow Techniques, International Journal Computer Vision", Vol.12, No.1, pp.43-77, 1994.J.L.Barron et al., "Performance of Optical Flow Techniques, International Journal Computer Vision", Vol.12, No.1, pp.43-77, 1994. B. Lucas et al., "An Iterative Image Registration Technique With An Application to Stereo Vision", Proceedings of DARPA Image Understanding Workshop, pp. 121-130, 1981.B. Lucas et al., "An Iterative Image Registration Technique With An Application to Stereo Vision", Proceedings of DARPA Image Understanding Workshop, pp. 121-130, 1981.

しかしながら、オプティカルフローを求めるのに、その更新値に制限を加えていないために、その演算回路内部のキャッシュメモリサイズが大きくなり、演算精度も悪くなる。さらに除算回路の回路規模とサイクル数が大きいという問題点があった。   However, since there is no restriction on the update value for obtaining the optical flow, the cache memory size in the arithmetic circuit becomes large and the arithmetic accuracy also deteriorates. Furthermore, there is a problem that the circuit scale and the number of cycles of the divider circuit are large.

本発明の目的は以上の問題点を解決し、オプティカルフローの演算において、従来技術に比較して、より短い演算時間で演算可能であって計算コストを軽減でき、しかも演算精度を改善できる画像処理装置及び方法を提供することにある。   The object of the present invention is to solve the above-mentioned problems, and in the calculation of optical flow, image processing that can be performed in a shorter calculation time and can reduce the calculation cost and can improve the calculation accuracy as compared with the prior art. It is to provide an apparatus and method.

第1の発明に係る画像処理装置は、2つのフレームの画像データに対してサブサンプリングとフィルタリングとを実行することにより階層化画像データを生成する階層化演算手段と、
上記階層化演算手段により生成された階層化画像データに基づいて空間輝度勾配行列とミスマッチベクトルを演算し、上記演算された空間輝度勾配行列及びミスマッチベクトルに基づいてオプティカルフローを演算するオプティカルフロー演算手段とを備えた画像処理装置において、
上記オプティカルフロー演算手段は、上記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定することを特徴とする。
An image processing apparatus according to a first aspect of the present invention is a hierarchization calculation means for generating hierarchized image data by performing sub-sampling and filtering on image data of two frames,
Optical flow calculation means for calculating a spatial luminance gradient matrix and a mismatch vector based on the hierarchical image data generated by the hierarchical calculation means, and calculating an optical flow based on the calculated spatial luminance gradient matrix and mismatch vector In an image processing apparatus comprising:
The optical flow calculation means limits the optical flow range of motion to a predetermined range by updating the optical flow with a predetermined upper limit value when propagating the calculated optical flow from an upper layer to a lower layer. It is limited to a movable range.

上記画像処理装置において、上記オプティカルフロー演算手段は、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除することを特徴とする。   In the image processing apparatus, the optical flow calculation means performs the multiplication operation on the calculated spatial luminance gradient matrix and the mismatch vector, and then executes the division operation using the recovery method algorithm. It is characterized in that the extension bit in the operation result is deleted.

また、上記画像処理装置において、上記階層化演算手段及び上記オプティカルフロー演算手段は所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始することを特徴とする。   In the image processing apparatus, the hierarchization calculation means and the optical flow calculation means execute a pipeline process using a plurality of predetermined calculation circuits, and calculate a predetermined area in the optical data of the image data. The calculation of the optical flow of the next region is started without waiting for the completion of the calculation of the optical flow of

第2の発明に係る画像処理方法は、2つのフレームの画像データに対してサブサンプリングとフィルタリングとを実行することにより階層化画像データを生成する階層化演算ステップと、
上記階層化演算ステップにより生成された階層化画像データに基づいて空間輝度勾配行列とミスマッチベクトルを演算し、上記演算された空間輝度勾配行列及びミスマッチベクトルに基づいてオプティカルフローを演算するオプティカルフロー演算ステップとを演算プロセッサ装置により実行する画像処理方法において、
上記オプティカルフロー演算ステップは、上記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定することを特徴とする。
An image processing method according to a second aspect of the present invention is a hierarchization calculation step for generating hierarchized image data by performing sub-sampling and filtering on image data of two frames;
An optical flow calculation step of calculating a spatial luminance gradient matrix and a mismatch vector based on the hierarchical image data generated by the hierarchical calculation step, and calculating an optical flow based on the calculated spatial luminance gradient matrix and the mismatch vector. In an image processing method in which
In the optical flow calculation step, when the calculated optical flow is propagated from an upper layer to a lower layer, the optical flow is limited to a predetermined upper limit value and updated, thereby changing a range of motion of the optical flow to a predetermined level. It is limited to a movable range.

上記画像処理方法において、上記オプティカルフロー演算ステップは、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除することを特徴とする。   In the image processing method, the optical flow calculation step includes performing the multiplication operation on the calculated spatial luminance gradient matrix and the mismatch vector, and then performing the division operation using the recovery method algorithm. It is characterized in that the extension bit in the operation result is deleted.

また、上記画像処理方法において、上記階層化演算ステップ及び上記オプティカルフロー演算ステップは所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始することを特徴とする。   Further, in the image processing method, the hierarchization calculation step and the optical flow calculation step execute pipeline processing using a plurality of predetermined calculation circuits, and calculate a predetermined area in the optical data of the image data. The calculation of the optical flow of the next region is started without waiting for the completion of the calculation of the optical flow of

本発明に係る画像処理装置及び方法によれば、記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定し、好ましくは、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除し、より好ましくは、上記階層化演算ステップ及び上記オプティカルフロー演算ステップは所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始する。これにより上記演算プロセッサのキャッシュ容量、除算回路の面積及び処理サイクル数を従来技術に比較して、大幅に削減できる。これにより、演算プロセッサのハードウェアの低消費電力化、高速化、及び省面積化を行うことができる。従って、オプティカルフローの演算において、従来技術に比較してより短い演算時間で演算することができ、オプティカルフローの演算プロセッサを構成したときにそのハードウェアを大幅に小型化できる。   According to the image processing apparatus and method of the present invention, when the calculated optical flow is propagated from the upper layer to the lower layer, the optical flow is updated by limiting a predetermined upper limit value to the optical flow. The range of motion is limited to a predetermined range of motion, and preferably, when the division operation is performed using the recovery method algorithm after performing the multiplication operation on the calculated spatial luminance gradient matrix and the mismatch vector, the division is performed. An extension bit in the calculation result of the calculation is deleted, and more preferably, the hierarchization calculation step and the optical flow calculation step execute pipeline processing using a plurality of predetermined calculation circuits, and the optical data of the image data Without waiting for the end of the calculation, the optical flow of the predetermined area where the flow is calculated It starts computing the optical flow area. As a result, the cache capacity of the arithmetic processor, the area of the division circuit, and the number of processing cycles can be greatly reduced as compared with the prior art. As a result, it is possible to reduce the power consumption, speed, and area of the hardware of the arithmetic processor. Therefore, in the calculation of the optical flow, the calculation can be performed in a shorter calculation time as compared with the prior art, and the hardware can be greatly downsized when the optical flow calculation processor is configured.

以下、本発明に係る実施形態について図面を参照して説明する。なお、以下の各実施形態において、同様の構成要素については同一の符号を付している。   Hereinafter, embodiments according to the present invention will be described with reference to the drawings. In addition, in each following embodiment, the same code | symbol is attached | subjected about the same component.

第1の実施形態.
図1は本発明の第1の実施形態に係るOPF演算プロセッサ20の詳細構成を示すブロック図である。また、図2は図1のOPF演算プロセッサ20によって実行される、オプティカルフローの演算において画像のウィンドウBの稼働限定域101を設けることを示す画像フレーム100の図である。第1の実施形態に係るOPF演算プロセッサ20は、
(A)オプティカルフローの更新値に上限値を設定し、例えば3画素以上をx方向及びy方向で切り捨てること、
(B)オプティカルフロー演算において、画素の処理順序をインターリーブすることにより、パイプライン処理でのアイドル期間を回避すること、
(C)OPF演算回路30内の除算回路32(図6参照。)の拡張ビット数を削減すること
を特徴としている。
First embodiment.
FIG. 1 is a block diagram showing a detailed configuration of the OPF arithmetic processor 20 according to the first embodiment of the present invention. FIG. 2 is a diagram of an image frame 100 showing that the operation limited area 101 of the image window B is provided in the optical flow calculation executed by the OPF calculation processor 20 of FIG. The OPF arithmetic processor 20 according to the first embodiment
(A) An upper limit value is set for the update value of the optical flow, and for example, 3 pixels or more are truncated in the x direction and the y direction.
(B) avoiding an idle period in pipeline processing by interleaving the processing order of pixels in an optical flow calculation;
(C) The number of extension bits of the division circuit 32 (see FIG. 6) in the OPF arithmetic circuit 30 is reduced.

図1において、OPF演算プロセッサ20を含む演算プロセッサ集積回路は例えばVLSIで実装され、全体制御用CPU10と、CPUバス20aと、処理すべき動画像データを予め記憶する画像メモリ11と、メモリバス20bと、OPF演算プロセッサ20と、CPUバス20aに接続された演算結果データメモリ(外部メモリ)12と、インターフェース13と、ディスプレイ14とを備えて構成される。ここで、OPF演算プロセッサ20は、
(a)CPUバス20aに接続され、CPU10の制御のもとでOPF演算プロセッサ20内の処理シーケンスを制御するシーケンスコントローラ21と、
(b)メモリバス20bに接続され、画像メモリ11からの制御のもとでOPF演算プロセッサ20内でのアドレスを発生して各回路に出力するアドレス発生器22と、
(c)画像メモリ11からの第1のフレーム画像の画像データを記憶するフレームAメモリ23と、
(d)画像メモリ11からの第2のフレーム画像の画像データを記憶するフレームBメモリ24と、
(e)メモリ23,24に格納された各フレームの画像データに基づいて階層化画像の画像データを演算することにより生成するPIC演算回路25と、
(f)PIC演算回路25により生成された階層化された第1の画像データを記憶する階層化画像Aメモリ26と、
(g)PIC演算回路25により生成された階層化された第2の画像データを記憶する階層化画像Bメモリ27と、
(h)階層化画像Aメモリ26に格納された画像データに基づいて空間輝度勾配行列を演算することにより生成するSGM演算回路28と、
(i)階層化画像Bメモリ27に格納された画像データに基づいてミスマッチベクトルを演算することにより生成するMMV演算回路29と、
(j)上記演算された空間輝度勾配行列及びミスマッチベクトルに基づいてオプティカルフローを演算するOPF演算回路30と
を備えて構成される。ここで、PIC演算回路25と、SGM演算回路28と、MMV演算回路29と、OPF演算回路30とはそれぞれ並列にパイプライン処理を行う。
In FIG. 1, an arithmetic processor integrated circuit including an OPF arithmetic processor 20 is implemented by, for example, VLSI, a CPU 10 for overall control, a CPU bus 20a, an image memory 11 for storing moving image data to be processed in advance, and a memory bus 20b. An OPF arithmetic processor 20, an arithmetic result data memory (external memory) 12 connected to the CPU bus 20a, an interface 13, and a display 14. Here, the OPF arithmetic processor 20
(A) a sequence controller 21 connected to the CPU bus 20a and controlling a processing sequence in the OPF arithmetic processor 20 under the control of the CPU 10;
(B) an address generator 22 connected to the memory bus 20b, which generates an address in the OPF arithmetic processor 20 under the control of the image memory 11 and outputs it to each circuit;
(C) a frame A memory 23 for storing image data of the first frame image from the image memory 11;
(D) a frame B memory 24 for storing image data of the second frame image from the image memory 11;
(E) a PIC operation circuit 25 that generates the image data of the hierarchized image based on the image data of each frame stored in the memories 23 and 24;
(F) a hierarchized image A memory 26 for storing the hierarchized first image data generated by the PIC arithmetic circuit 25;
(G) a hierarchized image B memory 27 for storing the second hierarchized image data generated by the PIC arithmetic circuit 25;
(H) an SGM calculation circuit 28 that generates a spatial luminance gradient matrix based on image data stored in the hierarchical image A memory 26;
(I) an MMV calculation circuit 29 that generates a mismatch vector based on image data stored in the hierarchical image B memory 27;
(J) An OPF calculation circuit 30 that calculates an optical flow based on the calculated spatial luminance gradient matrix and mismatch vector. Here, the PIC operation circuit 25, the SGM operation circuit 28, the MMV operation circuit 29, and the OPF operation circuit 30 perform pipeline processing in parallel.

PIC演算回路25は、メモリ23,24に格納された2つのフレームの画像データに基づいて、図20に示すように、サブサンプリングとガウシアンフィルタリングを行い、階層化画像データを生成してそれぞれメモリ26,27に出力して格納する。SGM演算回路28はメモリ26に格納された階層化画像データに基づいて空間輝度勾配行列Gを算出する。ここで、SGM演算回路28では、まず現フレームの階層化画像データから小数点画素の輝度値を補間し、現フレームにおける処理用の小領域であるウィンドウAを作成する。次に、ウィンドウA内でx方向及びy方向の空間輝度勾配を求める。そして、求めた空間輝度勾配を用いて、画素毎に空間輝度勾配行列の要素を計算する。最後に求められた空間輝度勾配行列の要素を行方向に加算する。これらの処理をウィンドウサイズと同じ回数だけ繰り返すことによりウィンドウ内の総和の空間輝度勾配行列Gが導出される。MMV演算回路29はメモリ27に格納された階層化画像データに基づいてミスマッチベクトルbを演算する。MMV演算回路29では、まず上位階層のオプティカルフローを用いて、次フレームの階層化画像から移動先の小数点画素の輝度値を補間する。次に、ウィンドウBを作成し、SGM演算回路28により求めたウィンドウAとウィンドウBを用いて時間輝度勾配を求める。そしてSGM演算回路28により求められた空間輝度勾配行列と時間輝度勾配から各画素のミスマッチベクトルを計算する。最後にSGM演算回路28と同様に計算結果を加算することで、ウィンドウ内の総和のミスマッチベクトルbが導出される。OPF演算回路30は空間輝度勾配行列G及びミスマッチベクトルbに基づいてオプティカルフローuを算出する。OPF演算回路30では、SGM演算回路28及びMMV演算回路29により計算された空間輝度勾配行列G及びミスマッチベクトルbを用いて式(4)を解き、オプティカルフローuを計算する。すなわち、オプティカルフローuは次式で計算できる。   The PIC arithmetic circuit 25 performs sub-sampling and Gaussian filtering on the basis of the image data of the two frames stored in the memories 23 and 24, generates hierarchical image data, respectively, as shown in FIG. , 27 to be stored. The SGM arithmetic circuit 28 calculates a spatial luminance gradient matrix G based on the hierarchized image data stored in the memory 26. Here, the SGM arithmetic circuit 28 first interpolates the luminance value of the decimal point pixel from the hierarchized image data of the current frame, and creates a window A that is a small area for processing in the current frame. Next, the spatial luminance gradient in the x direction and the y direction in the window A is obtained. Then, using the obtained spatial luminance gradient, the elements of the spatial luminance gradient matrix are calculated for each pixel. Finally, the elements of the spatial luminance gradient matrix obtained are added in the row direction. By repeating these processes as many times as the window size, the total spatial brightness gradient matrix G in the window is derived. The MMV arithmetic circuit 29 calculates the mismatch vector b based on the hierarchized image data stored in the memory 27. First, the MMV arithmetic circuit 29 interpolates the luminance value of the destination decimal point pixel from the hierarchized image of the next frame using the optical flow of the upper layer. Next, window B is created, and a time luminance gradient is obtained using window A and window B obtained by SGM operation circuit 28. Then, a mismatch vector of each pixel is calculated from the spatial luminance gradient matrix and the temporal luminance gradient obtained by the SGM calculation circuit 28. Finally, by adding the calculation results in the same manner as in the SGM operation circuit 28, the mismatch vector b of the sum in the window is derived. The OPF arithmetic circuit 30 calculates an optical flow u based on the spatial luminance gradient matrix G and the mismatch vector b. The OPF arithmetic circuit 30 solves the equation (4) using the spatial luminance gradient matrix G and the mismatch vector b calculated by the SGM arithmetic circuit 28 and the MMV arithmetic circuit 29, and calculates the optical flow u. That is, the optical flow u can be calculated by the following equation.

[数3]
u=G−1b (7)
[Equation 3]
u = G −1 b (7)

最後に、算出されたオプティカルフローを、前回の計算で得られたオプティカルフローに加算し、オプティカルフローを更新する。演算されたオプティカルフローuは演算結果データメモリ12に格納された後、インターフェース13を介してディスプレイ14に出力されて表示される。   Finally, the calculated optical flow is added to the optical flow obtained in the previous calculation to update the optical flow. The calculated optical flow u is stored in the calculation result data memory 12 and then output to the display 14 via the interface 13 and displayed.

従来のOPFプロセッサにおいてリアルタイム処理を実現しようとした場合、キャッシュ容量の増大、サイクル数の増加などの問題からリアルタイム処理と省面積、低消費電力の両立が非常に困難である。これに対して、本発明に係る第1の実施形態では、精度の向上、キャッシュ容量の低減、サイクル数の低減等、リアルタイム処理と省面積、低消費電力を同時に実現するための2つの要素技術を提案する。   When trying to realize real-time processing in a conventional OPF processor, it is very difficult to achieve both real-time processing, area saving, and low power consumption due to problems such as an increase in cache capacity and an increase in the number of cycles. On the other hand, in the first embodiment according to the present invention, two elemental technologies for simultaneously realizing real-time processing, area saving, and low power consumption, such as improvement in accuracy, reduction in cache capacity, and reduction in the number of cycles. Propose.

本発明に係る第1の実施形態では、OPFプロセッサ20の要素技術として、2つの新しい提案手法を提案する。第1の提案手法はオプティカルフロー更新値の上限の設定であり、第2の提案手法はウィンドウインターリーブ手法である。以下、それぞれの新しい提案手法について説明する。   In the first embodiment according to the present invention, two new proposed methods are proposed as elemental technologies of the OPF processor 20. The first proposed method is to set the upper limit of the optical flow update value, and the second proposed method is a window interleave method. Each new proposed method will be described below.

まず、第1の提案手法に係るオプティカルフローの上限の設定について説明する。従来法のOPFプロセッサにおいては、オプティカルフローの大きさに上限を設定していない。このため、雑音などにより、ありえない大きさの更新値が発生した場合でもそのまま演算を進める。これに対し、第1の提案手法ではオプティカルフローの大きさに上限を設定する。すなわち、第1の提案手法では、3以上の長さのオプティカルフローが検出された場合、これを3に切り捨てる(図2)。すなわち、図2において、画像フレーム100内のウィンドウBについて次のウィンドウBをOPF演算するときに、ウィンドウBの可動限定域101を設定し、その更新値をその範囲に限定する(上限値を設定する)ものである。具体的には図3のフローチャートを用いる。   First, the setting of the upper limit of the optical flow according to the first proposed method will be described. The conventional OPF processor does not set an upper limit on the size of the optical flow. For this reason, even if an update value having an impossible size is generated due to noise or the like, the calculation proceeds as it is. On the other hand, in the first proposed method, an upper limit is set for the size of the optical flow. That is, in the first proposed method, when an optical flow having a length of 3 or more is detected, this is rounded down to 3 (FIG. 2). That is, in FIG. 2, when the next window B is OPF-calculated for the window B in the image frame 100, the movable limited area 101 of the window B is set, and the updated value is limited to that range (the upper limit value is set). To do). Specifically, the flowchart of FIG. 3 is used.

図3は図1のOPF演算プロセッサ20によって実行されるPLKアルゴリズムによるオプティカルフロー演算処理を示すフローチャートである。図3のオプティカルフロー演算処理は、従来技術に係る図22のオプティカルフロー演算処理に比較して、ステップS11−S14の処理を追加したことを特徴としている。ステップS6のOPF演算処理後のステップS11において、上記演算されたオプティカルフローuのx成分uが3以下であれば、そのままオプティカルフローとして用いるが、3を超える場合は、ステップS12において当該オプティカルフローuのx成分uを上限値3に更新する。次いで、ステップS13において、上記演算されたオプティカルフローuのy成分uが3以下であれば、そのままオプティカルフローとして用いるが、3を超える場合は、ステップS14において当該オプティカルフローuのy成分uを上限値3に更新する。そして、ステップS7に進む。ここで、上限値を3に更新しているが、本発明はこれに限らず、所定の上限値であってもよい。 FIG. 3 is a flowchart showing optical flow calculation processing by the PLK algorithm executed by the OPF calculation processor 20 of FIG. The optical flow calculation process of FIG. 3 is characterized in that the processes of steps S11 to S14 are added as compared to the optical flow calculation process of FIG. 22 according to the prior art. In step S11 after the OPF calculation processing in step S6, if the following x-component u x is 3 in the operational optical flow u, if it is used as it is as the optical flow, in excess of 3, the optical flow in step S12 update u of x component u x the upper limit 3. Next, in step S13, if the calculated y component u y of the optical flow u is 3 or less, it is used as an optical flow as it is. If it exceeds 3, the y component u y of the optical flow u is exceeded in step S14. Is updated to the upper limit 3. Then, the process proceeds to step S7. Here, although the upper limit value is updated to 3, the present invention is not limited to this, and may be a predetermined upper limit value.

この第1の提案手法は従来法に対し以下の3つの利点を得る。利点の1つめは精度の向上である。正しいオプティカルフローはある一定以上の大きさを示すことはないため、ノイズの影響などで誤って求められた極端に大きいオプティカルフローを許容することは精度の劣化につながる。   The first proposed method has the following three advantages over the conventional method. The first advantage is improved accuracy. Since the correct optical flow does not indicate a certain size or larger, allowing an extremely large optical flow that is erroneously obtained due to the influence of noise or the like leads to deterioration of accuracy.

図4は従来技術及び第1の実施形態に係るOPF演算プロセッサ20のシミュレーション結果であって、各パラメータに対する平均絶対誤差MAEを示す図である。また、図5は従来技術及び第1の実施形態に係るOPF演算プロセッサ20のシミュレーション結果であって、各パラメータに対する平均二乗誤差MSEを示す図である。図4及び図5において、Lは階層数を示し、Wはウィンドウサイズを示し、Iは繰り返し回数を示す。図4及び図5から明らかなように、上限を設定した場合、MAEはほぼ変わらず、MSEは大きく改善されている。   FIG. 4 is a simulation result of the OPF arithmetic processor 20 according to the related art and the first embodiment, and shows the average absolute error MAE for each parameter. FIG. 5 is a simulation result of the OPF arithmetic processor 20 according to the related art and the first embodiment, and shows a mean square error MSE for each parameter. 4 and 5, L indicates the number of layers, W indicates the window size, and I indicates the number of repetitions. As apparent from FIGS. 4 and 5, when the upper limit is set, the MAE is not substantially changed, and the MSE is greatly improved.

次いで、利点の2つめはキャッシュの容量の削減である。オプティカルフローに上限を設定しない場合、フレーム全体の画素をキャッシュに保持する必要があり、キャッシュ容量が大きくなりやすい。これに対しオプティカルフローの上限を設定した場合、フレームの一部の画素をキャッシュに保持すればよいこととなり、キャッシュ容量を削減することが可能である。フレーム全体を保持する場合1200キロバイト必要であったキャッシュ容量を98.5%削減し、18キロバイトにすることができる。   Next, the second advantage is a reduction in cache capacity. If no upper limit is set for the optical flow, it is necessary to hold the pixels of the entire frame in the cache, and the cache capacity tends to increase. On the other hand, when the upper limit of the optical flow is set, it is only necessary to hold some pixels of the frame in the cache, and the cache capacity can be reduced. If the entire frame is held, the cache capacity required for 1200 kilobytes can be reduced by 98.5% to 18 kilobytes.

さらに、利点の3つめは、回復法アルゴリズムを用いたOPF演算回路30内の除算回路32−1乃至32−4(総称して、符号32を付す。)におけるサイクル数及び回路規模の削減である。図6は図1のOPF演算回路30の構成を示すブロック図である。図6において、OPF演算回路30は、式(4)を用いてオプティカルフローuを演算するために、32ビット乗算回路31と、パイプライン処理のための4個の除算回路32−1乃至32−4を備えて構成される。ここで、32ビット乗算回路31による乗算後の行列G’及びベクトルb’は次式で表される。   Further, the third advantage is the reduction in the number of cycles and the circuit scale in the division circuits 32-1 to 32-4 (generically, denoted by reference numeral 32) in the OPF arithmetic circuit 30 using the recovery method algorithm. . FIG. 6 is a block diagram showing a configuration of the OPF arithmetic circuit 30 of FIG. In FIG. 6, the OPF arithmetic circuit 30 uses a 32-bit multiplication circuit 31 and four division circuits 32-1 to 32-- for pipeline processing in order to calculate an optical flow u using Expression (4). 4 is configured. Here, the matrix G ′ and the vector b ′ after multiplication by the 32-bit multiplication circuit 31 are expressed by the following equations.

[数4]
G’=[XXX…X000…0] (8)
ここで、[XXX…X]=Gであり、[000…0]=拡張ビットである。
[数5]
b’=[000…0YYY…Y] (9)
ここで、[000…0]=拡張ビットであり、[YYY…Y]=bである。
[Equation 4]
G ′ = [XXX ... X000 ... 0] (8)
Here, [XXX... X] = G and [000... 0] = extension bit.
[Equation 5]
b '= [000 ... 0YYY ... Y] (9)
Here, [000... 0] = extended bit and [YYY... Y] = b.

図7は図6の除算回路32−1乃至32−4(32)の構成を示すブロック図である。ここで、図7の除算回路32は回復法を用いたアーキテクチャである。図7において、除算回路32は、マルチプレクサ33と、2個のレジスタ34,35と、減算器36と、マルチプレクサ37とを備えて構成される。ここで、マルチプレクサ33,37はクロックCLに基づいて互いに交互にデータの1つを選択するように切り替える。行列G’はレジスタ35を介して減算器36に入力される一方、ベクトルb’はマルチプレクサ33及びレジスタ34を介して減算器36に入力される。減算器36はレジスタ34からのデータからレジスタ35からのデータを減算し、減算結果の符号1ビットを部分商の符号ビットとして出力するとともに、減算結果のデータ(符号を除く。)をマルチプレクサ37に出力する。マルチプレクサ37は上述のようにクロックCLに従って、入力される2つのデータのうちの1つのデータを選択してマルチプレクサ33に出力する。   FIG. 7 is a block diagram showing the configuration of the division circuits 32-1 to 32-4 (32) of FIG. Here, the division circuit 32 of FIG. 7 is an architecture using a recovery method. In FIG. 7, the division circuit 32 includes a multiplexer 33, two registers 34 and 35, a subtractor 36, and a multiplexer 37. Here, the multiplexers 33 and 37 are switched so as to alternately select one of the data based on the clock CL. The matrix G ′ is input to the subtractor 36 via the register 35, while the vector b ′ is input to the subtractor 36 via the multiplexer 33 and the register 34. The subtracter 36 subtracts the data from the register 35 from the data from the register 34, outputs the sign 1 bit of the subtraction result as the sign bit of the partial quotient, and the subtraction result data (excluding the sign) to the multiplexer 37. Output. As described above, the multiplexer 37 selects one of the two input data according to the clock CL and outputs it to the multiplexer 33.

回復法アルゴリズムにおいては、除数をG、被除数をbとした場合G>bを満たす必要がある。この条件を満たすため、従来技術に係るアーキテクチャにおいては除数nビット及び被除数nビットに対しそれぞれ拡張ビットnビットを追加し2nビットとする必要がある。これに対し、本実施形態では、オプティカルフローすなわち除算結果の上限を設定することにより、上限以上の値をすべて上限に丸めることができるため(具体的には、各除算回路32からの除算結果のデータのビット数を制限する。)、拡張ビット数を削減することが可能である。オプティカルフローの上限をmに制限することにより、拡張ビット数は√(m)となる。回復法を用いたアーキテクチャでは拡張後のビット数が演算サイクル数となるため、演算サイクル数を2nからn+√(m)に削減できる。演算ビット数が減るため、回路規模の削減にもつながる。提案手法を用いた場合、回復法アルゴリズムを用いた除算回路32の回路規模を47%削減することができる。   In the recovery algorithm, it is necessary to satisfy G> b when the divisor is G and the dividend is b. In order to satisfy this condition, in the architecture according to the prior art, it is necessary to add 2 bits of extension bits to the divisor n bits and the dividend n bits, respectively, to 2 n bits. On the other hand, in the present embodiment, by setting the upper limit of the optical flow, that is, the division result, all values above the upper limit can be rounded to the upper limit (specifically, the division result from each division circuit 32 is The number of bits of data is limited), and the number of extension bits can be reduced. By limiting the upper limit of the optical flow to m, the number of extension bits becomes √ (m). In the architecture using the recovery method, since the number of bits after expansion becomes the number of operation cycles, the number of operation cycles can be reduced from 2n to n + √ (m). Since the number of operation bits is reduced, the circuit scale is also reduced. When the proposed method is used, the circuit scale of the divider circuit 32 using the recovery method algorithm can be reduced by 47%.

次に、第2の提案手法に係るウィンドウインターリーブ手法について説明する。階層的なオプティカルフローを求める場合、従来法のオプティカルフロープロセッサにおいては、上位階層の結果が得られるまで下位階層の演算を開始できず、パイプラインストールが起こるという問題が発生していた。これに対し提案法では、結果が相互に影響しない複数画素の上位階層の結果を連続的に演算し、その後に下位階層の演算を行うウィンドウインターリーブ手法を用いている。図8は従来技術に係るパイプライン処理におけるOPF演算プロセッサの各演算回路の演算タイミングを示すフロー図である。また、図9は第1の実施形態に係るウィンドウインターリーブ法を用いたパイプライン処理における図1のOPF演算プロセッサ20の各演算回路の演算タイミングを示すフロー図である。図8及び図9において、各矩形部分は各回路での画像データを示し、ここで、L3は階層3を示し、p0は画素列0を示し、row0は画素行0を示し、以下同様である。   Next, a window interleaving method according to the second proposed method will be described. In the case of obtaining a hierarchical optical flow, the conventional optical flow processor has a problem in that the operation of the lower layer cannot be started until the result of the upper layer is obtained, and the pipeline installation occurs. In contrast, in the proposed method, a window interleaving method is used in which the results of the upper layer of a plurality of pixels whose results do not affect each other are continuously calculated and then the lower layer is calculated. FIG. 8 is a flowchart showing the operation timing of each operation circuit of the OPF operation processor in the pipeline processing according to the prior art. FIG. 9 is a flowchart showing the calculation timing of each calculation circuit of the OPF calculation processor 20 in FIG. 1 in the pipeline processing using the window interleaving method according to the first embodiment. 8 and 9, each rectangular portion indicates image data in each circuit, where L3 indicates the hierarchy 3, p0 indicates the pixel column 0, row0 indicates the pixel row 0, and so on. .

図8及び図9から明らかなように、PIC演算回路25と、MMV演算回路29内のMV演算器と、MMV演算回路29内の加算器と、OPF演算回路30とが並列に処理されるパイプライン処理を実行する。しかしながら、図8から明らかなように、従来技術では、ある画素行のオプティカルフローuを計算するまで、次の画素行を計算しないために無駄な「アイドル期間」が発生している。これに対して、本実施形態では、図1のシーケンスコントローラ21及びアドレス発生器22の制御により、ある画素行のオプティカルフローuの計算終了を待たずに、次の画素行についてPIC演算回路25及びMMV演算回路29のMV演算器の処理を開始しており、「アイドル期間」が発生しない。従って、従来技術に比較してパイプラインストールのサイクルを削減することが可能である。これにより、従来技術に比較して、ウィンドウインターリーブ手法を用いることによって必要サイクル数を65%削減することができる。   As is apparent from FIGS. 8 and 9, the PIC arithmetic circuit 25, the MV arithmetic unit in the MMV arithmetic circuit 29, the adder in the MMV arithmetic circuit 29, and the OPF arithmetic circuit 30 are processed in parallel. Execute line processing. However, as is apparent from FIG. 8, in the conventional technique, the next pixel row is not calculated until the optical flow u of a certain pixel row is calculated, and thus a useless “idle period” occurs. On the other hand, in the present embodiment, the control of the sequence controller 21 and the address generator 22 in FIG. 1 does not wait for the completion of the calculation of the optical flow u of a certain pixel row, and the PIC arithmetic circuit 25 and The processing of the MV calculator of the MMV calculation circuit 29 is started, and the “idle period” does not occur. Therefore, it is possible to reduce the pipeline installation cycle compared to the prior art. Thereby, compared with the prior art, the required number of cycles can be reduced by 65% by using the window interleaving method.

以上説明したように、本実施形態によれば、(A)オプティカルフローの更新値に上限値を設定し、例えば3画素以上をx方向及びy方向で切り捨て、(B)オプティカルフロー演算において、画素の処理順序をインターリーブすることにより、パイプライン処理でのアイドル期間を回避し、(C)OPF演算回路30内の除算回路32の拡張ビット数を削減することにより、OPFプロセッサ20のキャッシュ容量、除算回路32の面積及び処理サイクル数を従来技術に比較して、大幅に削減できる。これにより、OPFプロセッサ20のハードウェアの低消費電力化、高速化、及び省面積化を行うことができる。   As described above, according to the present embodiment, (A) an upper limit value is set for the update value of the optical flow, for example, three or more pixels are discarded in the x direction and the y direction, and (B) By interleaving the processing order, the idle period in the pipeline processing is avoided, and (C) the cache capacity and division of the OPF processor 20 are reduced by reducing the number of extension bits of the dividing circuit 32 in the OPF arithmetic circuit 30. Compared with the prior art, the area of the circuit 32 and the number of processing cycles can be greatly reduced. Thereby, it is possible to reduce the power consumption, increase the speed, and reduce the area of the hardware of the OPF processor 20.

第2の実施形態.
図10は従来技術に係るオプティカルフロー演算における第1乃至第4の画素順序の演算方法を示す図であり、図11は本発明の第2の実施形態に係るオプティカルフロー演算における第1の画素順序の演算方法を示す図である。図1のPIC演算回路25によって実行される階層化処理では、下位レベルの画像に対してサブサンプリングを用いて、上位階層の画像を作成しているため、下位階層の座標(2x,2y)で表される画素のオプティカルフローを求める場合に使われる階層化画像は、下位階層の座標(2x+1,2y)、(2x,2y+1)、(2x+1,2y+1)のときに用いられる階層化画像と同じものになる。そのため、図10の従来技術では、画面左上から右下まで1行毎に走査して行く処理順序では、偶数行の処理で作成した階層化画像を、再び奇数行で作成し直すことになる。すなわち、図10において、階層化画像を保存する内部キャッシュメモリ(PIC演算回路25内の内部キャッシュメモリをいう。)の内容が階層化画像A、B、Cと更新されてゆくことになるが、次の奇数行の処理では、再びAからCまでの階層化画像を作成する必要が出てくる。そのために処理に重複が生じ、無駄なサイクルとなってしまい、性能の低下や消費電力の増加を招くことになる。これを避けるために1行分の階層化画像A、B、Cを記憶するキャッシュメモリを用意すると、今度は膨大なハードウェアの増加を招くことになる。
Second embodiment.
FIG. 10 is a diagram illustrating a first to fourth pixel order calculation method in the optical flow calculation according to the related art, and FIG. 11 is a first pixel order in the optical flow calculation according to the second embodiment of the present invention. It is a figure which shows the calculation method of. In the hierarchization processing executed by the PIC arithmetic circuit 25 in FIG. 1, since the upper layer image is created by using subsampling for the lower level image, the lower layer coordinates (2x, 2y) are used. The hierarchized image used when obtaining the optical flow of the represented pixel is the same as the hierarchized image used when the coordinates (2x + 1, 2y), (2x, 2y + 1), (2x + 1, 2y + 1) are in the lower hierarchy. become. Therefore, in the prior art of FIG. 10, in the processing order in which scanning is performed line by line from the upper left to the lower right of the screen, the hierarchized image created by the processing of the even lines is again created by the odd lines. That is, in FIG. 10, the contents of the internal cache memory (referred to as the internal cache memory in the PIC arithmetic circuit 25) that stores the hierarchical image are updated as the hierarchical images A, B, and C. In the processing of the next odd row, it becomes necessary to create a hierarchized image from A to C again. For this reason, the processing is duplicated, resulting in a useless cycle, resulting in a decrease in performance and an increase in power consumption. In order to avoid this, if a cache memory for storing the hierarchized images A, B, and C for one line is prepared, a huge increase in hardware will be caused.

これに対して、本発明の第2の実施形態では、例えば図11に示すような「Z字形状」の画素順序で繰り返しサブサンプリングした後オプティカルフローを求める。同じ階層化画像を使用する隣接4画素単位に行うことになるので、階層化処理の重複が回避され、サイクル数の削減が可能になる。図12は図11の第1の画素順序の演算方法(L=3のとき)を示す図であり、図13は図11の第1の画素順序の演算方法(L=4のとき)を示す図であるすなわち、階層数Lが2より大きい場合が図12及び図13に示されており、4L−1画素単位の階層繰り返し処理となる。   On the other hand, in the second embodiment of the present invention, the optical flow is obtained after repeated sub-sampling in the “Z-shaped” pixel order as shown in FIG. 11, for example. Since the same hierarchized image is used for every four adjacent pixels, duplication of the hierarchizing process is avoided, and the number of cycles can be reduced. FIG. 12 is a diagram illustrating the first pixel order calculation method in FIG. 11 (when L = 3), and FIG. 13 illustrates the first pixel order calculation method in FIG. 11 (when L = 4). That is, the case where the number of layers L is greater than 2 is shown in FIG. 12 and FIG. 13 and is a layer repetition process in units of 4L-1 pixels.

図14乃至図16は図11の変形例であって、それぞれ本発明の第2の実施形態に係るオプティカルフロー演算における第2乃至第4の画素順序の演算方法を示す図である。図14では、「U字形状」の画素順序で繰り返しサブサンプリングした後オプティカルフローを求める。同じ階層化画像を使用する隣接4画素単位に行うことになるので、階層化処理の重複が回避され、サイクル数の削減が可能になる。また、図15では、「コの字形状」又は「Cの字を左右反転した形状」の画素順序でサブサンプリングした後オプティカルフローを求める。同じ階層化画像を使用する隣接4画素単位に行うことになるので、階層化処理の重複が回避され、サイクル数の削減が可能になる。さらに、図16では、「X字形状」又は「αの字を左右反転した形状」の画素順序でサブサンプリングした後オプティカルフローを求める。同じ階層化画像を使用する隣接4画素単位に行うことになるので、階層化処理の重複が回避され、サイクル数の削減が可能になる。   FIGS. 14 to 16 are modifications of FIG. 11 and are diagrams illustrating second to fourth pixel order calculation methods in the optical flow calculation according to the second embodiment of the present invention, respectively. In FIG. 14, the optical flow is obtained after repeated sub-sampling in the “U-shaped” pixel order. Since the same hierarchized image is used for every four adjacent pixels, duplication of the hierarchizing process is avoided, and the number of cycles can be reduced. In FIG. 15, the optical flow is obtained after sub-sampling in the pixel order of “U-shape” or “C-shape reversed horizontally”. Since the same hierarchized image is used for every four adjacent pixels, duplication of the hierarchizing process is avoided, and the number of cycles can be reduced. Further, in FIG. 16, the optical flow is obtained after sub-sampling in the pixel order of “X shape” or “shape obtained by horizontally inverting the shape of α”. Since the same hierarchized image is used for every four adjacent pixels, duplication of the hierarchizing process is avoided, and the number of cycles can be reduced.

次いで、第2の実施形態に係るOPF演算プロセッサ20おけるオプティカルフローの上位階層から下位階層への伝搬方法の改善について以下に説明する。 Next, a description from the upper layer of the optical flow definitive in OPF calculation processor 20 according to the second embodiment below improve the propagation process to the lower hierarchy.

PIC演算回路25による階層化処理では1/2のサブサンプリングを行っているため、階層Lでの1画素は、階層L−1での4画素分の情報量に相当する。図17は本発明の第2の実施形態に係る第1のオプティカルフローの伝搬方法を示す図である。この伝搬方法では、図17に示すように、階層Lにおいて座標L(0,0)の1画素から、階層L−1の4画素の座標に対応するL(1,0)、L(0,1)、L(1,1)の3種類の内挿画素を作成し、それぞれのオプティカルフローを求め、階層L−1に伝搬する。すなわち、当該伝搬方法では、以下のようにオプティカルフローを演算している。なお、座標L(0,0)は階層Lの画素座標(0,0)を示し、座標L−1(0,0)は階層L−1の画素座標(0,0)を示し、以下同様に表記する。   In the hierarchization processing by the PIC arithmetic circuit 25, 1/2 sub-sampling is performed, so one pixel in the hierarchy L corresponds to the amount of information for four pixels in the hierarchy L-1. FIG. 17 is a diagram showing a first optical flow propagation method according to the second embodiment of the present invention. In this propagation method, as shown in FIG. 17, L (1,0), L (0, L) corresponding to coordinates of four pixels on the layer L-1 from one pixel on the layer L in the layer L. 1) Three types of interpolated pixels of L (1,1) are created, their respective optical flows are obtained, and propagated to the layer L-1. That is, in the propagation method, the optical flow is calculated as follows. The coordinate L (0, 0) indicates the pixel coordinate (0, 0) of the layer L, the coordinate L-1 (0, 0) indicates the pixel coordinate (0, 0) of the layer L-1, and so on. Indicate.

(1)L(0,0)のオプティカルフロー導出:L(0,0)の輝度値I(0,0)を使って求めて、下位階層に伝搬させる。 (1) Optical flow derivation of L (0,0): Obtained using the luminance value I (0,0) of L (0,0) and propagate to the lower layer.

(2)L(1,0)のオプティカルフロー導出:I(0,0)とL(2,0)の輝度値I(2,0)を使ってL(1,0)の輝度値I(1,0)を次式により内挿する。
[数6]
I(1,0)=(1−s)I(0,0)+sI(2,0) (10)
ここで、sはx方向の内挿係数であって、s=1/2に設定される。これは、2:1サブサンプリングによりI(1,0)が存在しないためである。この輝度値を用いてオプティカルフローを計算し、その後下位階層に伝搬させる。
(2) Optical flow derivation of L (1, 0): L (1, 0) luminance value I (() using I (0, 0) and L (2, 0) luminance value I (2, 0) 1, 0) is interpolated by the following equation.
[Equation 6]
I (1,0) = (1-s) I (0,0) + sI (2,0) (10)
Here, s is an interpolation coefficient in the x direction, and is set to s = 1/2. This is because I (1,0) does not exist due to 2: 1 subsampling. An optical flow is calculated using this luminance value, and then propagated to a lower layer.

(3)L(0,1)のオプティカルフロー導出:I(0,0),I(0,2)を使って輝度値I(0,1)を内挿する。
[数7]
I(1,0)=(1−t)I(0,0)+tI(0,2) (11)
ここで、tはy方向の内挿係数であって、s=1/2に設定される。
(3) Optical flow derivation of L (0,1): I (0,0) and I (0,2) are used to interpolate the luminance value I (0,1).
[Equation 7]
I (1,0) = (1-t) I (0,0) + tI (0,2) (11)
Here, t is an interpolation coefficient in the y direction, and is set to s = 1/2.

(4)L(1,1)のオプティカルフロー導出:I(0,0)、I(0,2)、I(2,0)、I(2,2)を使って輝度値I(1,1)を内挿する。
[数8]
I(1,1)
=(1−s)(1−t)I(0,0)+s(1−t)I(2,0)
+(1−s)tI(0,2)+stI(2,2) (12)
(4) Optical flow derivation of L (1,1): luminance value I (1,1) using I (0,0), I (0,2), I (2,0), I (2,2) 1) is interpolated.
[Equation 8]
I (1,1)
= (1-s) (1-t) I (0,0) + s (1-t) I (2,0)
+ (1-s) tI (0,2) + stI (2,2) (12)

以上説明したように、第1のオプティカルフローの伝搬方法によれば、上位階層で演算した複数のオプティカルフローのうち演算すべき座標に隣接する2つ又は4つの画素のオプティカルフローを内挿することにより演算したオプティカルフローを下位階層に伝搬して下位階層のオプティカルフローを演算する。   As described above, according to the first optical flow propagation method, the optical flow of two or four pixels adjacent to the coordinates to be calculated among a plurality of optical flows calculated in the upper layer is interpolated. The optical flow calculated by the above is propagated to the lower layer to calculate the optical flow of the lower layer.

図18は第2の実施形態に係る第2のオプティカルフローの伝搬方法を示す図である。この伝搬方法では、座標L(1/2,1/2)で内挿画素を1つだけ作成し、その1画素を用いてオプティカルフロー演算を行い、その値をL−1(0,0)、L−1(1,0)、L−1(0,1)、L−1(1,1)の4画素に対して共通に伝搬し階層L−1での初期値とする。すなわち、中心の座標は(1/2,1/2)と考え、I(1/2,1/2)を内挿により求めて、次式のごとくオプティカルフローを計算する。それを下位階層の4画素共通に用いる。   FIG. 18 is a diagram illustrating a second optical flow propagation method according to the second embodiment. In this propagation method, only one interpolation pixel is created at coordinates L (1/2, 1/2), optical flow calculation is performed using the one pixel, and the value is calculated as L-1 (0, 0). , L-1 (1, 0), L-1 (0, 1), and L-1 (1, 1) are propagated in common to the initial value in the layer L-1. That is, assuming that the coordinates of the center are (1/2, 1/2), I (1/2, 1/2) is obtained by interpolation, and the optical flow is calculated as follows. This is used in common for the lower four pixels.

[数9]
I(1/2,1/2)
=(1−s)(1−t)I(0,0)+s(1−t)I(2,0)
+(1−s)tI(0,2)+stI(2,2) (13)
ここで、s=t=1/4である。
[Equation 9]
I (1/2, 1/2)
= (1-s) (1-t) I (0,0) + s (1-t) I (2,0)
+ (1-s) tI (0,2) + stI (2,2) (13)
Here, s = t = 1/4.

以上説明したように、第2のオプティカルフローの伝搬方法によれば、上位階層で演算した各オプティカルフローを下位階層の複数の画素に共通に伝搬してそれを初期値として当該複数の画素で共通に用いて下位階層のオプティカルフローを演算し、ここで、上記上位階層で演算したオプティカルフローは、上記上位階層の画像領域を互いに隣接する4つの画素を含む領域を単位として分割し、その各領域内の4つの画素のオプティカルフローを内挿することにより、その各領域内の平均座標におけるオプティカルフローを演算した結果のオプティカルフローである。これにより、内挿画素作成のサイクルが1画素分だけに削減でき、オプティカルフロー演算も1画素分のみとなる。この場合、全4画素に対して、等しい距離においてオプティカルフローを計算するため、オプティカルフローの精度を維持しつつサイクル数の削減が可能となり、性能向上が図られる。   As described above, according to the second optical flow propagation method, each optical flow calculated in the upper layer is propagated in common to a plurality of pixels in the lower layer, and is used as an initial value in common with the plurality of pixels. The optical flow calculated in the lower hierarchy is divided into the image areas in the upper hierarchy in units of areas including four pixels adjacent to each other. This is an optical flow obtained as a result of calculating the optical flow at the average coordinates in each region by interpolating the optical flows of the four pixels. As a result, the interpolation pixel creation cycle can be reduced to only one pixel, and the optical flow calculation is also limited to one pixel. In this case, since the optical flow is calculated at the same distance for all four pixels, the number of cycles can be reduced while maintaining the accuracy of the optical flow, and the performance can be improved.

図19は第2の実施形態に係る第3のオプティカルフローの伝搬方法を示す図である。この伝搬方法では、座標L(0,0)の画素から1画素分のオプティカルフローを求め、その値をL−1(0,0)、L−1(1,0)、L−1(0,1)、L−1(1,1)の4画素に対して共通に伝搬し階層L−1での初期値とする。すなわち、I(0,0)を用いてオプティカルフローを求め、下位階層の4画素で共通に伝搬させる。   FIG. 19 is a diagram illustrating a third optical flow propagation method according to the second embodiment. In this propagation method, an optical flow for one pixel is obtained from a pixel having coordinates L (0, 0), and the values are obtained as L-1 (0, 0), L-1 (1, 0), L-1 (0). , 1) and L-1 (1, 1) are propagated in common to the four pixels and set as an initial value in the layer L-1. That is, an optical flow is obtained using I (0, 0) and propagated in common in the four pixels in the lower layer.

以上説明したように、第2のオプティカルフローの伝搬方法によれば、上位階層で演算した各オプティカルフローを下位階層の複数の画素に共通に伝搬してそれを初期値として当該複数の画素で共通に用いて下位階層のオプティカルフローを演算し、ここで、上記上位階層で演算したオプティカルフローは、上記上位階層の画像領域を互いに隣接する4つの画素を含む領域を単位として分割し、その各領域内の4つの画素のうちの1つの画素のオプティカルフローである。従って、精度は若干劣化するものの内挿画素作成処理が不要となり、さらに他の3画素のオプティカルフロー計算も不要となる。従って、演算器の削減と、更なるサイクル数の削減が可能となり、性能向上及びハードウェアの小型化を図ることができる。   As described above, according to the second optical flow propagation method, each optical flow calculated in the upper layer is propagated in common to a plurality of pixels in the lower layer, and is used as an initial value in common with the plurality of pixels. The optical flow calculated in the lower hierarchy is divided into the image areas in the upper hierarchy in units of areas including four pixels adjacent to each other. This is an optical flow of one of the four pixels. Accordingly, although the accuracy is slightly deteriorated, the interpolation pixel creation process is not required, and the optical flow calculation of the other three pixels is not required. Therefore, it is possible to reduce the number of arithmetic units and the number of cycles, and it is possible to improve performance and downsize hardware.

以上説明したように、本実施形態によれば、PIC演算回路25による階層化処理において、同じ階層化画像を使用する隣接4画素単位に行うことになるので、階層化処理の重複が回避され、サイクル数の削減が可能になる。また、上位階層で求めたオプティカルフローを下位階層の複数の画素に共通に伝搬させて下位階層のオプティカルフローの演算を行うので、オプティカルフローを外挿するサイクルやそのための演算回路などのハードウェアが不要となる。従って、従来技術に比較して、オプティカルフローの演算時間を短縮できるとともに、OPF演算プロセッサのハードウェアを小型化できる。   As described above, according to the present embodiment, in the hierarchization processing by the PIC arithmetic circuit 25, since the same hierarchized image is performed in units of four adjacent pixels, duplication of the hierarchization processing is avoided, The number of cycles can be reduced. In addition, since the optical flow obtained in the upper layer is propagated in common to a plurality of pixels in the lower layer and the optical flow in the lower layer is calculated, hardware such as a cycle for extrapolating the optical flow and an arithmetic circuit therefor are used. It becomes unnecessary. Therefore, the optical flow calculation time can be shortened and the hardware of the OPF calculation processor can be downsized as compared with the prior art.

以上詳述したように、本発明に係る画像処理装置及び方法によれば、記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定し、好ましくは、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除し、より好ましくは、上記階層化演算ステップ及び上記オプティカルフロー演算ステップは所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始する。これにより上記演算プロセッサのキャッシュ容量、除算回路の面積及び処理サイクル数を従来技術に比較して、大幅に削減できる。これにより、演算プロセッサのハードウェアの低消費電力化、高速化、及び省面積化を行うことができる。従って、オプティカルフローの演算において、従来技術に比較してより短い演算時間で演算することができ、オプティカルフローの演算プロセッサを構成したときにそのハードウェアを大幅に小型化できる。   As described above in detail, according to the image processing apparatus and method of the present invention, when the calculated optical flow is propagated from the upper layer to the lower layer, the predetermined upper limit value is limited to the optical flow and updated. Thus, the range of motion of the optical flow is limited to a predetermined range of motion, and preferably, after performing the multiplication operation on the calculated spatial luminance gradient matrix and mismatch vector, the division operation is performed using the recovery algorithm. When executing, the extension bit in the operation result of the division operation is deleted, more preferably, the layered operation step and the optical flow operation step perform pipeline processing using a predetermined plurality of operation circuits, Calculates the optical flow of a predetermined area that calculates the optical flow of the image data Without waiting for the end, it starts to calculating an optical flow in the following areas. As a result, the cache capacity of the arithmetic processor, the area of the division circuit, and the number of processing cycles can be greatly reduced as compared with the prior art. As a result, it is possible to reduce the power consumption, speed, and area of the hardware of the arithmetic processor. Therefore, in the calculation of the optical flow, the calculation can be performed in a shorter calculation time as compared with the prior art, and the hardware can be greatly downsized when the optical flow calculation processor is configured.

本発明の第1の実施形態に係るOPF演算プロセッサ20の詳細構成を示すブロック図である。It is a block diagram which shows the detailed structure of the OPF arithmetic processor 20 which concerns on the 1st Embodiment of this invention. 図1のOPF演算プロセッサ20によって実行される、オプティカルフローの演算において画像のウィンドウBの稼働限定域101を設けることを示す画像フレーム100の図である。FIG. 2 is a diagram of an image frame 100 showing that an operation limited area 101 of an image window B is provided in an optical flow calculation executed by the OPF calculation processor 20 of FIG. 1. 図1のOPF演算プロセッサ20によって実行されるPLKアルゴリズムによるオプティカルフロー演算処理を示すフローチャートである。It is a flowchart which shows the optical flow arithmetic processing by the PLK algorithm performed by the OPF arithmetic processor 20 of FIG. 従来技術及び第1の実施形態に係るOPF演算プロセッサ20のシミュレーション結果であって、各パラメータに対する平均絶対誤差MAEを示す図である。It is a simulation result of the OPF arithmetic processor 20 which concerns on a prior art and 1st Embodiment, Comprising: It is a figure which shows the average absolute error MAE with respect to each parameter. 従来技術及び第1の実施形態に係るOPF演算プロセッサ20のシミュレーション結果であって、各パラメータに対する平均二乗誤差MSEを示す図である。It is a simulation result of the OPF arithmetic processor 20 which concerns on a prior art and 1st Embodiment, Comprising: It is a figure which shows the mean square error MSE with respect to each parameter. 図1のOPF演算回路30の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an OPF arithmetic circuit 30 in FIG. 1. 図6の除算回路32−1乃至32−4(32)の構成を示すブロック図である。It is a block diagram which shows the structure of the division circuits 32-1 thru | or 32-4 (32) of FIG. 従来技術に係るパイプライン処理におけるOPF演算プロセッサの各演算回路の演算タイミングを示すフロー図である。It is a flowchart which shows the arithmetic timing of each arithmetic circuit of the OPF arithmetic processor in the pipeline process which concerns on a prior art. 第1の実施形態に係るウィンドウインターリーブ法を用いたパイプライン処理における図1のOPF演算プロセッサ20の各演算回路の演算タイミングを示すフロー図である。It is a flowchart which shows the arithmetic timing of each arithmetic circuit of the OPF arithmetic processor 20 of FIG. 1 in the pipeline process using the window interleave method which concerns on 1st Embodiment. 従来技術に係るオプティカルフロー演算における画素順序の演算方法を示す図である。It is a figure which shows the calculation method of the pixel order in the optical flow calculation which concerns on a prior art. 本発明の第2の実施形態に係るオプティカルフロー演算における第1の画素順序の演算方法を示す図である。It is a figure which shows the calculation method of the 1st pixel order in the optical flow calculation which concerns on the 2nd Embodiment of this invention. 図11の第1の画素順序の演算方法(L=3のとき)を示す図である。It is a figure which shows the calculation method (when L = 3) of the 1st pixel order of FIG. 図11の第1の画素順序の演算方法(L=4のとき)を示す図である。It is a figure which shows the calculation method (when L = 4) of the 1st pixel order of FIG. 本発明の第2の実施形態に係るオプティカルフロー演算における第2の画素順序の演算方法を示す図である。It is a figure which shows the calculation method of the 2nd pixel order in the optical flow calculation which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るオプティカルフロー演算における第3の画素順序の演算方法を示す図である。It is a figure which shows the calculation method of the 3rd pixel order in the optical flow calculation which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るオプティカルフロー演算における第4の画素順序の演算方法を示す図である。It is a figure which shows the calculation method of the 4th pixel order in the optical flow calculation which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る第1のオプティカルフローの伝搬方法を示す図である。It is a figure which shows the propagation method of the 1st optical flow which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る第2のオプティカルフローの伝搬方法を示す図である。It is a figure which shows the propagation method of the 2nd optical flow which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る第3のオプティカルフローの伝搬方法を示す図である。It is a figure which shows the propagation method of the 3rd optical flow which concerns on the 2nd Embodiment of this invention. 従来技術に係るオプティカルフローの演算における階層化を示す図である。It is a figure which shows the hierarchization in the calculation of the optical flow which concerns on a prior art. 従来技術に係るオプティカルフローの演算におけるフィルタリングの一例を示す図である。It is a figure which shows an example of the filtering in the calculation of the optical flow which concerns on a prior art. 従来技術に係るPLKアルゴリズムによるオプティカルフロー演算処理を示すフローチャートである。It is a flowchart which shows the optical flow calculation process by the PLK algorithm which concerns on a prior art.

符号の説明Explanation of symbols

10…CPU、
11…画像メモリ、
12…演算結果データメモリ、
13…インターフェース、
14…ディスプレイ、
20…OPF演算プロセッサ、
21…シーケンスコントローラ、
22…アドレス発生器、
23…フレームAメモリ、
24…フレームBメモリ、
25…PIC演算回路、
26…階層化画像Aメモリ、
27…階層化画像Bメモリ、
28…SGM演算回路、
29…MMV演算回路、
30…OPF演算回路、
31…32ビット乗算回路、
32−1乃至32−4…除算回路、
33,37…マルチプレクサ、
34,35…レジスタ、
36…減算器、
100…画像フレーム。
10 ... CPU,
11: Image memory,
12 ... Operation result data memory,
13 ... Interface,
14 ... Display,
20 ... OPF processor,
21 ... Sequence controller,
22: Address generator,
23: Frame A memory,
24 ... Frame B memory,
25 ... PIC arithmetic circuit,
26: Hierarchical image A memory,
27: Hierarchical image B memory,
28 ... SGM arithmetic circuit,
29 ... MMV arithmetic circuit,
30 ... OPF arithmetic circuit,
31 ... 32-bit multiplication circuit,
32-1 to 32-4... Division circuit,
33, 37 ... Multiplexer,
34, 35 ... registers,
36 ... subtractor,
100: Image frame.

Claims (4)

2つのフレームの画像データに対してサブサンプリングとフィルタリングとを実行することにより階層化画像データを生成する階層化演算手段と、
上記階層化演算手段により生成された階層化画像データに基づいて空間輝度勾配行列とミスマッチベクトルを演算し、上記演算された空間輝度勾配行列及びミスマッチベクトルに基づいてオプティカルフローを演算するオプティカルフロー演算手段とを備えた画像処理装置において、
上記オプティカルフロー演算手段は、上記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定し、
上記階層化演算手段及び上記オプティカルフロー演算手段は所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始することを特徴とする画像処理装置。
Hierarchization calculation means for generating hierarchized image data by performing sub-sampling and filtering on image data of two frames;
Optical flow calculation means for calculating a spatial luminance gradient matrix and a mismatch vector based on the hierarchical image data generated by the hierarchical calculation means, and calculating an optical flow based on the calculated spatial luminance gradient matrix and mismatch vector In an image processing apparatus comprising:
The optical flow calculation means limits the optical flow range of motion to a predetermined range by updating the optical flow with a predetermined upper limit value when propagating the calculated optical flow from an upper layer to a lower layer. Limited to the range of motion ,
The hierarchization calculation means and the optical flow calculation means execute pipeline processing using a plurality of predetermined calculation circuits, and finish the calculation of the optical flow in a predetermined area for calculating the optical flow in the image data. An image processing apparatus, which starts calculating an optical flow of the next area without waiting .
上記オプティカルフロー演算手段は、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除することを特徴とする請求項1記載の画像処理装置。   The optical flow calculation means performs the multiplication operation on the calculated spatial luminance gradient matrix and the mismatch vector, and then executes an extension bit in the calculation result of the division operation when performing the division operation using the recovery algorithm. The image processing apparatus according to claim 1, wherein the image processing apparatus is deleted. 2つのフレームの画像データに対してサブサンプリングとフィルタリングとを実行することにより階層化画像データを生成する階層化演算ステップと、
上記階層化演算ステップにより生成された階層化画像データに基づいて空間輝度勾配行列とミスマッチベクトルを演算し、上記演算された空間輝度勾配行列及びミスマッチベクトルに基づいてオプティカルフローを演算するオプティカルフロー演算ステップとを演算プロセッサ装置により実行する画像処理方法において、
上記オプティカルフロー演算ステップは、上記演算されたオプティカルフローを上位階層から下位階層に伝搬させるときに上記オプティカルフローに所定の上限値を限定して更新することにより、上記オプティカルフローの可動域を所定の可動域に限定し、
上記階層化演算ステップ及び上記オプティカルフロー演算ステップは所定の複数の演算回路を用いてパイプライン処理を実行し、上記画像データのうちのオプティカルフローを演算する所定の領域のオプティカルフローを演算の終了を待たずに、次の領域のオプティカルフローを演算することを開始することを特徴とする画像処理方法。
A hierarchization calculation step of generating hierarchized image data by performing sub-sampling and filtering on image data of two frames;
An optical flow calculation step of calculating a spatial luminance gradient matrix and a mismatch vector based on the hierarchical image data generated by the hierarchical calculation step, and calculating an optical flow based on the calculated spatial luminance gradient matrix and the mismatch vector. In an image processing method in which
In the optical flow calculation step, when the calculated optical flow is propagated from an upper layer to a lower layer, the optical flow is limited and updated by limiting a predetermined upper limit value, so that a range of motion of the optical flow is determined. Limited to the range of motion ,
The hierarchization calculation step and the optical flow calculation step execute pipeline processing using a plurality of predetermined calculation circuits, and finish the calculation of the optical flow in a predetermined area for calculating the optical flow of the image data. An image processing method, which starts calculating an optical flow of the next area without waiting .
上記オプティカルフロー演算ステップは、上記演算された空間輝度勾配行列及びミスマッチベクトルについて乗算演算を実行した後、回復法アルゴリズムを用いて除算演算を実行するときに、上記除算演算の演算結果における拡張ビットを削除することを特徴とする請求項記載の画像処理方法。 In the optical flow calculation step, the multiplication operation is performed on the calculated spatial luminance gradient matrix and the mismatch vector, and then the extension bit in the calculation result of the division operation is set when performing the division operation using the recovery algorithm. 4. The image processing method according to claim 3 , wherein the image processing method is deleted.
JP2007290754A 2007-11-08 2007-11-08 Image processing apparatus and method Expired - Fee Related JP4662969B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007290754A JP4662969B2 (en) 2007-11-08 2007-11-08 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007290754A JP4662969B2 (en) 2007-11-08 2007-11-08 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2009116730A JP2009116730A (en) 2009-05-28
JP4662969B2 true JP4662969B2 (en) 2011-03-30

Family

ID=40783792

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007290754A Expired - Fee Related JP4662969B2 (en) 2007-11-08 2007-11-08 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4662969B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5712925B2 (en) * 2009-09-28 2015-05-07 日本電気株式会社 Image conversion parameter calculation apparatus, image conversion parameter calculation method, and program
JP6155087B2 (en) * 2013-05-01 2017-06-28 日本放送協会 Motion estimation apparatus and program
CN114399539A (en) * 2022-01-14 2022-04-26 合肥英睿***技术有限公司 Method, apparatus and storage medium for detecting moving object

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07154801A (en) * 1993-11-29 1995-06-16 Ricoh Co Ltd Hierarchical motion vector detection method
JP2000242900A (en) * 1999-02-24 2000-09-08 Mitsubishi Motors Corp Device for detecting interruption vehicle
JP2002170111A (en) * 2000-12-01 2002-06-14 Sanyo Electric Co Ltd Image synthesizing apparatus and method and recording medium recording image synthesizing program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07154801A (en) * 1993-11-29 1995-06-16 Ricoh Co Ltd Hierarchical motion vector detection method
JP2000242900A (en) * 1999-02-24 2000-09-08 Mitsubishi Motors Corp Device for detecting interruption vehicle
JP2002170111A (en) * 2000-12-01 2002-06-14 Sanyo Electric Co Ltd Image synthesizing apparatus and method and recording medium recording image synthesizing program

Also Published As

Publication number Publication date
JP2009116730A (en) 2009-05-28

Similar Documents

Publication Publication Date Title
KR101393048B1 (en) Method and apparatus for super-resolution of images
CN112104830B (en) Video frame insertion method, model training method and corresponding device
CN114731408B (en) System, apparatus and method for video frame interpolation using structured neural networks
Li et al. Video super-resolution using an adaptive superpixel-guided auto-regressive model
Chen VLSI implementation of an adaptive edge-enhanced image scalar for real-time multimedia applications
TW201146011A (en) Bi-directional, local and global motion estimation based frame rate conversion
TWI490819B (en) Image processing method and apparatus thereof
JP4662969B2 (en) Image processing apparatus and method
JP4563982B2 (en) Motion estimation method, apparatus, program thereof, and recording medium thereof
Gour et al. Hardware accelerator for real-time image resizing
JP4662968B2 (en) Image processing apparatus and method
JP4409526B2 (en) Optical flow processor
Oh et al. FPGA-based fast image warping with data-parallelization schemes
CN111093045B (en) Method and device for scaling video sequence resolution
CN112422976B (en) Brightness component motion compensation method in video coding standard and video coding method
Ihm et al. Low-cost depth camera pose tracking for mobile platforms
JP4232869B2 (en) Conversion unit and apparatus, and image processing apparatus
JP6059899B2 (en) Frame interpolation apparatus and program
JP2010033406A (en) Image processing device, image device, and image processing method
JP5387289B2 (en) Image processing apparatus, image processing method and program thereof
Imamura et al. Scalable Architecture for High-Resolution Real-time Optical Flow Processor
Iu et al. Re-examining the optical flow constraint. A new optical flow algorithm with outlier rejection
JP3634878B2 (en) Image encoding device
JP2009104228A (en) Image alignment method and image alignment program
JP6155087B2 (en) Motion estimation apparatus and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100826

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100914

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101019

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

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

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

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees