lucas–kanade_Lucas–Kanade
博主聲明:本文英文內容全部來自于http://en.wikipedia.org/wiki/Lucas_Kanade_method,中文由博主據此進行翻譯而來。
在計算機視覺中,Lucas-Kanade方法是一種廣泛使用的光流估算差分方法,它由Bruce D.Lucas和Takeo Kanade共同開發。它假定在所考慮的像素的局部鄰域內,本質上光流是恒定的,由此利用最小二乘原則對鄰域內所有像素求解基本光流方程。[In?computer vision, the?Lucas–Kanade method?is a widely used differential method for?optical flow?estimation developed by?Bruce D. Lucas?and?Takeo Kanade. It assumes that the flow is essentially constant in a local neighbourhood of the?pixel?under consideration, and solves the basic optical flow equations for all the pixels in that neighbourhood, by the?least squares criterion.
通過綜合多個附近像素的信息,Lucas-Kanade方法通常可以解決光流方程固有的模糊性問題。與逐點方法相比,對于圖像噪聲它也不太敏感。另一方面,因為這是一種純局部的方法,它不能夠提供圖像均勻區域內的光流信息。[By combining information from several nearby pixels, the Lucas-Kanade method can often resolve the inherent ambiguity of the optical flow equation. It is also less sensitive to image noise than point-wise methods. On the other hand, since it is a purely local method, it cannot provide flow information in the interior of uniform regions of the image.]
概念[Concept]
Lucas-Kanade方法假定兩個附近幀圖像內容的位移很小而且在所考慮的點p的鄰域內大體不變。因此可以假定在以點p為中心的窗口內的所有像素,光流方程可以適用。就是說,局部圖像光流矢量(Vx,Vy)必須滿足以下方程:[The Lucas-Kanade method assumes that the displacement of the image contents between two nearby instants (frames) is small and approximately constant within a neighborhood of the point?punder consideration. Thus the?optical flow equation?can be assumed to hold for all pixels within a window centered at?p. Namely, the local image flow (velocity) vector
?must satisfy]
這里,q1,q2,...,qn都是窗口內的像素,Ix(qi),Iy(qi),It(qi)是圖像I相對于位置x,y和時間t的偏微分,這些量的估算是在點qi和當前時間進行的。[where
?are the pixels inside the window, and
?are the partial derivatives of the image?
?with respect to position?x,?yand time?t, evaluated at the point?
?and at the current time.]
這些方程可以寫成矩陣Av=b的形式,其中:[These equations can be written in?matrix?form
, where]
該系統方程的數量多于未知量,因此通常它是over-determined。Lucas-Kanade方法包括了根據最小二乘原理的一個折中解。[This system has more equations than unknowns and thus it is usually over-determined. The Lucas-Kanade method obtains a compromise solution by the?least squares?principle.]
即求解一個2*2的系統:[Namely, it solves the 2×2 system]
?or
此處,AT是矩陣A的轉置,即它計算:[where
?is the?transpose?of matrix?
?. That is, it computes]
上述求和是從j=1 到n [with the sums running from?i=1 to?n.]
矩陣ATA通常被稱作圖像在點p的結構張量。[The matrix
?is often called the?structure tensorof the image at the point?p.]
加權窗口[Weighted window]
上述普通的最小二乘解對窗口內n個像素qi一視同仁。事實上,通常對于靠近中心像素p的像素更多的權重會更好。[The plain least squares solution above gives the same importance to all?n?pixels
?in the window. In practice it is usually better to give more weight to the pixels that are closer to the central pixel?p.]
介于此,人們使用最小二乘方程的加權版本:[For that, one uses the weighted version of the least squares equation,]
or
此處,W是一個n*n的對角矩陣,包含權重Wii=wi,被指定到像素qi的方程。[where
?is an?n×ndiagonal matrix?containing the weights?
?to be assigned to the equation of pixel?
?.]
亦即,它計算:[That is, it computes]
權重wi通常被設置為qi和p之間距離的高斯函數。[The weight
?is usually set to a?Gaussian function?of the distance between?
?and?p.]
改進和提高[Improvements and extensions]
最小二乘方法暗含以下假設,即圖像數據的誤差具有零均值高斯分布。如果人們預期窗口包含一定百分比的outliers(粗大誤差數據,它不遵循“通常”的高斯誤差分布),人們可以通過統計分析來檢測他們,并減小他們相應的權重。[The least-squares approach implicitly assumes that the errors in the image data have a Gaussian distribution with zero mean. If one expects the window to contain a certain percentage of "outliers" (grossly wrong data values, that do not follow the "ordinary" Gaussian error distribution), one may use statistical analysis to detect them, and reduce their weight accordingly.]
Lucas-Kanade方法(per se?)只可被用于當兩幀圖像之間的光流矢量Vx,Vy小到足以使微分光流方程得以維持的情況下,通常來說它小于像素間距。當流矢量超過此限制,比如在立體匹配或warped document registration, Lucas-Kanade方法仍然可被用于精細化一些由其它方法得來的同一運動的粗糙的估計,例如,通過外推由以前幀計算的流矢量,或通過在reduced scale versions of images上運行Lucas-Kanade算法。的確,后一種方法是廣為人知的Kanade-Lucas-Tomasi(KLT)特征匹配算法的基礎。[The Lucas-Kanade method per se can be used only when the image flow vector
?between the two frames is small enough for the differential equation of the optical flow to hold, which is often less than the pixel spacing. When the flow vector may exceed this limit, such as in stereo matching or warped document registration, the Lucas-Kanade method may still be used to refine some coarse estimate of the same, obtained by other means; for example, by?extrapolating?the flow vectors computed for previous frames, or by running the Lucas-Kanade algorithm on reduced-scale versions of the images. Indeed, the latter method is the basis of the popular?Kanade-Lucas-Tomasi (KLT)?feature matching algorithm.]
一種類似的技術可被用于計算圖像內容的差分仿射形變。[A similar technique can be used to compute differential?affine?deformations of the image contents.]
亦請看[See also]
參考文獻[References]
B. D. Lucas and T. Kanade (1981),
外部鏈接[External links]
Mathworks Lucas-Kanade?Matlab implementation of inverse and normal?affine?Lucas-Kanade
FolkiGPU?:?GPU implementation of an iterative Lucas-Kanade based optical flow
Lucas-Kanade for the iPhone?by Success Labs. A modified and enhanced port of the OpenCV lkdemo sample application to the iPhone.
KLT: An Implementation of the Kanade–Lucas–Tomasi Feature Tracker
總結
以上是生活随笔為你收集整理的lucas–kanade_Lucas–Kanade的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python爬虫————获取英雄联盟所有
- 下一篇: Canvas Scaler