學習OpenCV——Kalman濾波

轉載:http://blog.csdn.net/sangni007/article/details/8075911


背景:

卡爾曼濾波是一種高效率的遞歸濾波器(自迴歸濾波器), 它能夠從一系列的不完全及包含噪聲測量中,估計動態系統的狀態。卡爾曼濾波的一個典型實例是從一組有限的,包含噪聲的,對物體位置的觀察序列(可能有偏差)預測出物體的位置的座標速度

這種濾波方法以它的發明者魯道夫.E.卡爾曼(Rudolph E. Kalman)命名,但是根據文獻可知實際上Peter Swerling在更早之前就提出了一種類似的算法。

斯坦利.施密特(Stanley Schmidt)首次實現了卡爾曼濾波器。卡爾曼在NASA埃姆斯研究中心訪問時,發現他的方法對於解決阿波羅計劃的軌道預測很有用,後來阿波羅飛船的導航電腦便使用了這種濾波器。 關於這種濾波器的論文由Swerling (1958)、Kalman (1960)與 Kalman and Bucy (1961)發表。

目前,卡爾曼濾波已經有很多不同的實現.卡爾曼最初提出的形式現在一般稱爲簡單卡爾曼濾波器。除此以外,還有施密特擴展濾波器、信息濾波器以及很多Bierman, Thornton 開發的平方根濾波器的變種。也許最常見的卡爾曼濾波器是鎖相環,它在收音機、計算機和幾乎任何視頻或通訊設備中廣泛存在。


模型:

基本動態系統模型:

卡爾曼濾波建立在線性代數隱馬爾可夫模型(hidden Markov model)上。其基本動態系統可以用一個馬爾可夫鏈表示,該馬爾可夫鏈建立在一個被高斯噪聲(即正態分佈的噪聲)干擾的線性算子上的。系統的狀態可以用一個元素爲實數的向量表示。 隨着離散時間的每一個增加,這個線性算子就會作用在當前狀態上,產生一個新的狀態,並也會帶入一些噪聲,同時系統的一些已知的控制器的控制信息也會被加入。同時,另一個受噪聲干擾的線性算子產生出這些隱含狀態的可見輸出。

模型圖:

                                                    

爲了從一系列有噪聲的觀察數據中用卡爾曼濾波器估計出被觀察過程的內部狀態,我們必須把這個過程在卡爾曼濾波的框架下建立模型。也就是說對於每一步k,定義矩陣

例如:KalmanFilter KF(stateNum, measureNum, 0);

F: KF.transitionMatrix

HKF.measurementMatrix

QKF.processNoiseCov

Rk  KF.measurementNoiseCov

PKF.errorCovPost

有時也需要定義BKF.ontrolMatrix

如下。

爾曼濾波模型假設k時刻的真實狀態是從(k − 1)時刻的狀態演化而來,符合下式:

            \textbf{x}_{k} = \textbf{F}_{k} \textbf{x}_{k-1} + \textbf{B}_{k}\textbf{u}_{k}  + \textbf{w}_{k}

其中

  • Fk 是作用在xk−1上的狀態變換模型(/矩陣/矢量)。 
  • Bk 是作用在控制器向量uk上的輸入-控制模型。 
  • wk 是過程噪聲,並假定其符合均值爲零,協方差矩陣Qk多元正態分佈
\textbf{w}_{k} \sim N(0, \textbf{Q}_k)

時刻k,對真實狀態 xk的一個測量zk滿足下式:

            \textbf{z}_{k} = \textbf{H}_{k} \textbf{x}_{k} + \textbf{v}_{k}

其中Hk是觀測模型,它把真實狀態空間映射成觀測空間,vk 是觀測噪聲,其均值爲零,協方差矩陣爲Rk,且服從正態分佈

\textbf{v}_{k} \sim N(0, \textbf{R}_k)

初始狀態以及每一時刻的噪聲{x0w1, ..., wkv1 ...vk} 都認爲是互相獨立的.

卡爾曼濾波器:

卡爾曼濾波是一種遞歸的估計,即只要獲知上一時刻狀態的估計值以及當前狀態的觀測值就可以計算出當前狀態的估計值,因此不需要記錄觀測或者估計的歷史信息。卡爾曼濾波器與大多數濾波器不同之處,在於它是一種純粹的時域濾波器,它不需要像低通濾波器頻域濾波器那樣,需要在頻域設計再轉換到時域實現。

卡爾曼濾波器的狀態由以下兩個變量表示:

  • \hat{\textbf{x}}_{k|k},在時刻k 的狀態的估計;
  • \textbf{P}_{k|k},誤差相關矩陣,度量估計值的精確程度。

卡爾曼濾波器的操作包括兩個階段:預測更新。在預測階段,濾波器使用上一狀態的估計,做出對當前狀態的估計。在更新階段,濾波器利用對當前狀態的觀測值優化在預測階段獲得的預測值,以獲得一個更精確的新估計值。

預測 predict:      Mat prediction = KF.predict();

\hat{\textbf{x}}_{k|k-1} = \textbf{F}_{k}\hat{\textbf{x}}_{k-1|k-1} + \textbf{B}_{k} \textbf{u}_{k} (預測狀態)
\textbf{P}_{k|k-1} =  \textbf{F}_{k} \textbf{P}_{k-1|k-1} \textbf{F}_{k}^{T} + \textbf{Q}_{k}  (預測估計協方差矩陣)

可參考:http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf

更新 updata:     KF.correct(measurement);

\tilde{\textbf{y}}_{k} = \textbf{z}_{k} - \textbf{H}_{k}\hat{\textbf{x}}_{k|k-1}  (測量餘量,measurement residual)
\textbf{S}_{k} = \textbf{H}_{k}\textbf{P}_{k|k-1}\textbf{H}_{k}^{T} + \textbf{R}_{k} (測量餘量協方差)
\textbf{K}_{k} = \textbf{P}_{k|k-1}\textbf{H}_{k}^{T}\textbf{S}_{k}^{-1}  (最優卡爾曼增益)
\hat{\textbf{x}}_{k|k} = \hat{\textbf{x}}_{k|k-1} + \textbf{K}_{k}\tilde{\textbf{y}}_{k}  (更新的狀態估計)
\textbf{P}_{k|k} = (I - \textbf{K}_{k} \textbf{H}_{k}) \textbf{P}_{k|k-1} (更新的協方差估計)

使用上述公式計算\textbf{P}_{k|k} 僅在最優卡爾曼增益的時候有效。使用其他增益的話,公式要複雜一些,請參見推導

不變量(Invariant)

如果模型準確,而且\hat{\textbf{x}}_{0|0}\textbf{P}_{0|0} 的值準確的反映了最初狀態的分佈,那麼以下不變量就保持不變:所有估計的誤差均值爲零

  • \textrm{E}[\textbf{x}_k - \hat{\textbf{x}}_{k|k}] = \textrm{E}[\textbf{x}_k - \hat{\textbf{x}}_{k|k-1}] = 0
  • \textrm{E}[\tilde{\textbf{y}}_k] = 0

且 協方差矩陣 準確的反映了估計的協方差:

  • \textbf{P}_{k|k} = \textrm{cov}(\textbf{x}_k - \hat{\textbf{x}}_{k|k})
  • \textbf{P}_{k|k-1} = \textrm{cov}(\textbf{x}_k - \hat{\textbf{x}}_{k|k-1})
  • \textbf{S}_{k} = \textrm{cov}(\tilde{\textbf{y}}_k)

請注意,其中\textrm{E}[\textbf{a}]表示{a}的期望值,\textrm{cov}(\textbf{a}) = \textrm{E}[\textbf{a}\textbf{a}^T]

 


 

代碼:

class Kalman:

  1. class CV_EXPORTS_W KalmanFilter  
  2. {  
  3. public:  
  4.     //! the default constructor  
  5.     CV_WRAP KalmanFilter();  
  6.     //! the full constructor taking the dimensionality of the state, of the measurement and of the control vector  
  7.     CV_WRAP KalmanFilter(int dynamParams, int measureParams, int controlParams=0, int type=CV_32F);  
  8.     //! re-initializes Kalman filter. The previous content is destroyed.  
  9.     void init(int dynamParams, int measureParams, int controlParams=0, int type=CV_32F);  
  10.   
  11.     //! computes predicted state  
  12.     CV_WRAP const Mat& predict(const Mat& control=Mat());  
  13.     //! updates the predicted state from the measurement  
  14.     CV_WRAP const Mat& correct(const Mat& measurement);  
  15.   
  16.     Mat statePre;           //!< predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k)  
  17.     Mat statePost;          //!< corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))  
  18.     Mat transitionMatrix;   //!< state transition matrix (A)  
  19.     Mat controlMatrix;      //!< control matrix (B) (not used if there is no control)  
  20.     Mat measurementMatrix;  //!< measurement matrix (H)  
  21.     Mat processNoiseCov;    //!< process noise covariance matrix (Q)  
  22.     Mat measurementNoiseCov;//!< measurement noise covariance matrix (R)  
  23.     Mat errorCovPre;        //!< priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/  
  24.     Mat gain;               //!< Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)  
  25.     Mat errorCovPost;       //!< posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)  
  26.       
  27.     // temporary matrices  
  28.     Mat temp1;  
  29.     Mat temp2;  
  30.     Mat temp3;  
  31.     Mat temp4;  
  32.     Mat temp5;  
  33. };  


sample\kalman.cpp

1個1維點的運動跟蹤,雖然這個點是在2維平面中運動,但由於它是在一個圓弧上運動,只有一個自由度,角度,所以還是1維的。還是一個勻速運動,建立勻速運動模型,設定狀態變量x = [ x1, x2 ] = [ 角度,角速度 ]

  

  1. #include "opencv2/video/tracking.hpp"  
  2. #include "opencv2/highgui/highgui.hpp"  
  3.   
  4. #include <stdio.h>  
  5.   
  6. using namespace cv;  
  7.   
  8. static inline Point calcPoint(Point2f center, double R, double angle)  
  9. {  
  10.     return center + Point2f((float)cos(angle), (float)-sin(angle))*(float)R;  
  11. }  
  12.   
  13. void help()  
  14. {  
  15.     printf( "\nExamle of c calls to OpenCV's Kalman filter.\n"  
  16. "   Tracking of rotating point.\n"  
  17. "   Rotation speed is constant.\n"  
  18. "   Both state and measurements vectors are 1D (a point angle),\n"  
  19. "   Measurement is the real point angle + gaussian noise.\n"  
  20. "   The real and the estimated points are connected with yellow line segment,\n"  
  21. "   the real and the measured points are connected with red line segment.\n"  
  22. "   (if Kalman filter works correctly,\n"  
  23. "    the yellow segment should be shorter than the red one).\n"  
  24.             "\n"  
  25. "   Pressing any key (except ESC) will reset the tracking with a different speed.\n"  
  26. "   Pressing ESC will stop the program.\n"  
  27.             );  
  28. }  
  29.   
  30. int main(intchar**)  
  31. {  
  32.     help();  
  33.     Mat img(500, 500, CV_8UC3);  
  34.     KalmanFilter KF(2, 1, 0);  
  35.     Mat state(2, 1, CV_32F); /* (phi, delta_phi) */  
  36.     Mat processNoise(2, 1, CV_32F);  
  37.     Mat measurement = Mat::zeros(1, 1, CV_32F);  
  38.     char code = (char)-1;  
  39.   
  40.     for(;;)  
  41.     {  
  42.         randn( state, Scalar::all(0), Scalar::all(0.1) );//隨機生成一個矩陣,期望是0,標準差爲0.1;  
  43.         KF.transitionMatrix = *(Mat_<float>(2, 2) << 1, 1, 0, 1);//元素導入矩陣,按行;  
  44.   
  45.         //setIdentity: 縮放的單位對角矩陣;  
  46.         //!< measurement matrix (H) 觀測模型  
  47.         setIdentity(KF.measurementMatrix);  
  48.         //!< process noise covariance matrix (Q)  
  49.         // wk 是過程噪聲,並假定其符合均值爲零,協方差矩陣爲Qk(Q)的多元正態分佈;  
  50.         setIdentity(KF.processNoiseCov, Scalar::all(1e-5));  
  51.         //!< measurement noise covariance matrix (R)  
  52.         //vk 是觀測噪聲,其均值爲零,協方差矩陣爲Rk,且服從正態分佈;  
  53.         setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));  
  54.         //!< priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/  A代表F: transitionMatrix  
  55.         //預測估計協方差矩陣;  
  56.         setIdentity(KF.errorCovPost, Scalar::all(1));  
  57.         //!< corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))  
  58.         randn(KF.statePost, Scalar::all(0), Scalar::all(0.1));  
  59.   
  60.         for(;;)  
  61.         {  
  62.             Point2f center(img.cols*0.5f, img.rows*0.5f);  
  63.             float R = img.cols/3.f;  
  64.             double stateAngle = state.at<float>(0);  
  65.             Point statePt = calcPoint(center, R, stateAngle);  
  66.   
  67.             Mat prediction = KF.predict();  
  68.             double predictAngle = prediction.at<float>(0);  
  69.             Point predictPt = calcPoint(center, R, predictAngle);  
  70.   
  71.             randn( measurement, Scalar::all(0), Scalar::all(KF.measurementNoiseCov.at<float>(0)));  
  72.   
  73.             // generate measurement  
  74.             measurement += KF.measurementMatrix*state;  
  75.   
  76.             double measAngle = measurement.at<float>(0);  
  77.             Point measPt = calcPoint(center, R, measAngle);  
  78.   
  79.             // plot points  
  80.             #define drawCross( center, color, d )                                 \  
  81.                 line( img, Point( center.x - d, center.y - d ),                \  
  82.                              Point( center.x + d, center.y + d ), color, 1, CV_AA, 0); \  
  83.                 line( img, Point( center.x + d, center.y - d ),                \  
  84.                              Point( center.x - d, center.y + d ), color, 1, CV_AA, 0 )  
  85.   
  86.             img = Scalar::all(0);  
  87.             drawCross( statePt, Scalar(255,255,255), 3 );  
  88.             drawCross( measPt, Scalar(0,0,255), 3 );  
  89.             drawCross( predictPt, Scalar(0,255,0), 3 );  
  90.             //line( img, statePt, measPt, Scalar(0,0,255), 3, CV_AA, 0 );  
  91.             //line( img, statePt, predictPt, Scalar(0,255,255), 3, CV_AA, 0 );  
  92.   
  93.             KF.correct(measurement);  
  94.   
  95.             randn( processNoise, Scalar(0), Scalar::all(sqrt(KF.processNoiseCov.at<float>(0, 0))));  
  96.             state = KF.transitionMatrix*state + processNoise;  
  97.   
  98.             imshow( "Kalman", img );  
  99.             code = (char)waitKey(100);  
  100.   
  101.             if( code > 0 )  
  102.                 break;  
  103.         }  
  104.         if( code == 27 || code == 'q' || code == 'Q' )  
  105.             break;  
  106.     }  
  107.   
  108.     return 0;  
  109. }  
  110. <span style="font-size:14px;color:#ff0000;"><img alt="" src="https://img-my.csdn.net/uploads/201210/16/1350365491_1888.JPG"></span>  

鼠標跟蹤(詳解):

1.初始化狀態:

onst int stateNum=4;//狀態數,包括(x,y,dx,dy)座標及速度(每次移動的距離)

const int measureNum=2;//觀測量,能看到的是座標值,當然也可以自己計算速度,但沒必要

轉移矩陣或者說增益矩陣的值好像有點莫名其妙

  1. float A[stateNum][stateNum] ={//transition matrix  
  2.         1,0,1,0,  
  3.         0,1,0,1,  
  4.         0,0,1,0,  
  5.         0,0,0,1  
  6.     };  

看下圖就清楚了

X1=X+dx,依次類推
所以這個矩陣還是很容易卻確定的,可以根據自己的實際情況定製轉移矩陣

同樣的方法,三維座標的轉移矩陣可以如下

  1. float A[stateNum][stateNum] ={//transition matrix  
  2.         1,0,0,1,0,0,  
  3.         0,1,0,0,1,0,  
  4.         0,0,1,0,0,1,  
  5.         0,0,0,1,0,0,  
  6.         0,0,0,0,1,0,  
  7.         0,0,0,0,0,1  
  8.     };  

當然並不一定得是1和0

 

 

KalmanFilter KF(stateNum, measureNum, 0);

//KalmanFilter::KalmanFilter(intdynamParams, intmeasureParams, int controlParams=0, inttype=CV_32F)

Parameters:
  • dynamParams – Dimensionality of the state.
  • measureParams – Dimensionality of the measurement.
  • controlParams – Dimensionality of the control vector.
  • type – Type of the created matrices that should beCV_32F orCV_64F.

 

Mat state (stateNum, 1, CV_32FC1);         //  state(x,y,detaX,detaY)

Mat processNoise(stateNum, 1, CV_32F); //  processNoise(x,y,detaX,detaY)

Mat measurement = Mat::zeros(measureNum, 1, CV_32F); //measurement(x,y)

 

需定義的參數矩陣:

F: KF.transitionMatrix

  1. KF.transitionMatrix = *(Mat_<float>(2, 2) << 1, 0, 1, 0......);  


HKF.measurementMatrix:

  1. setIdentity(KF.measurementMatrix);  


QKF.processNoiseCov

  1. setIdentity(KF.processNoiseCov, Scalar::all(1e-5));  

Rk  KF.measurementNoiseCov

  1. setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));  

PKF.errorCovPost

  1. setIdentity(KF.errorCovPost, Scalar::all(1));  


注意:其中: KF.transitionMatrix  :

                                         (1,0,1,0, 
                                          0,1,0,1, 
                                          0,0,1,0, 
                                          0,0,0,1 );

 

2.預測predict,讀出預測的位置
3.更新updata

   3.1.更新觀測矩陣:updata/generate measurement

  • 對於鼠標跟蹤:直接使用鼠標的實際位置更新,真實位置即爲觀測位置
  • 對於自動更新:
    1. randn( measurement, Scalar::all(0), Scalar::all(KF.measurementNoiseCov.at<float>(0)));  
    2.   
    3. // generate measurement  
    4. measurement += KF.measurementMatrix*state;  

    3.2.更新KF:KF.correct(measurement);

 

分別顯示前一狀態的位置:Point statePt = Point( (int)KF.statePost.at<float>(0), (int)KF.statePost.at<float>(1));;

預測位置:Point predictPt = Point( (int)prediction.at<float>(0), (int)prediction.at<float>(1));

觀測位置(真實位置):mousePosition(由setMouseCallback("Kalman", mouseEvent);得到,遞歸方式通過measurement計算得到)

 

  1. #include <opencv/cv.h>  
  2. #include <opencv/highgui.h>  
  3.   
  4. #include <iostream>  
  5.   
  6. using namespace cv;  
  7. using namespace std;  
  8.   
  9. const int winWidth = 800;  
  10. const int winHeight = 600;  
  11.   
  12. Point mousePosition = Point(winWidth>>1, winHeight>>1);  
  13.   
  14. //mouse call back  
  15. void mouseEvent(int event, int x, int y, int flags, void *param)  
  16. {  
  17.     if(event==CV_EVENT_MOUSEMOVE)  
  18.     {  
  19.         mousePosition=Point(x,y);  
  20.     }  
  21. }  
  22.   
  23. int main()  
  24. {  
  25.     //1.kalman filter setup     
  26.     const int stateNum=4;    
  27.     const int measureNum=2;    
  28.   
  29.     KalmanFilter KF(stateNum, measureNum, 0);  
  30.     Mat state (stateNum, 1, CV_32FC1); //state(x,y,detaX,detaY)  
  31.     Mat processNoise(stateNum, 1, CV_32F);  
  32.     Mat measurement = Mat::zeros(measureNum, 1, CV_32F);    //measurement(x,y)  
  33.   
  34.   
  35.         randn( state, Scalar::all(0), Scalar::all(0.1) ); //隨機生成一個矩陣,期望是0,標準差爲0.1;  
  36.         KF.transitionMatrix = *(Mat_<float>(4, 4) <<   
  37.             1,0,1,0,   
  38.             0,1,0,1,   
  39.             0,0,1,0,   
  40.             0,0,0,1 );//元素導入矩陣,按行;  
  41.   
  42.         //setIdentity: 縮放的單位對角矩陣;  
  43.         //!< measurement matrix (H) 觀測模型  
  44.         setIdentity(KF.measurementMatrix);  
  45.   
  46.         //!< process noise covariance matrix (Q)  
  47.         // wk 是過程噪聲,並假定其符合均值爲零,協方差矩陣爲Qk(Q)的多元正態分佈;  
  48.         setIdentity(KF.processNoiseCov, Scalar::all(1e-5));  
  49.           
  50.         //!< measurement noise covariance matrix (R)  
  51.         //vk 是觀測噪聲,其均值爲零,協方差矩陣爲Rk,且服從正態分佈;  
  52.         setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));  
  53.           
  54.         //!< priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/  A代表F: transitionMatrix  
  55.         //預測估計協方差矩陣;  
  56.         setIdentity(KF.errorCovPost, Scalar::all(1));  
  57.           
  58.   
  59.         //!< corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))  
  60.         //initialize post state of kalman filter at random   
  61.         randn(KF.statePost, Scalar::all(0), Scalar::all(0.1));  
  62.         Mat showImg(winWidth, winHeight,CV_8UC3);  
  63.   
  64.         for(;;)  
  65.         {  
  66.             setMouseCallback("Kalman", mouseEvent);  
  67.             showImg.setTo(0);  
  68.   
  69.             Point statePt = Point( (int)KF.statePost.at<float>(0), (int)KF.statePost.at<float>(1));  
  70.   
  71.             //2.kalman prediction     
  72.             Mat prediction = KF.predict();  
  73.             Point predictPt = Point( (int)prediction.at<float>(0), (int)prediction.at<float>(1));  
  74.   
  75.             //3.update measurement  
  76.             measurement.at<float>(0)= (float)mousePosition.x;  
  77.             measurement.at<float>(1) = (float)mousePosition.y;  
  78.   
  79.             //4.update  
  80.             KF.correct(measurement);  
  81.   
  82.             //randn( processNoise, Scalar(0), Scalar::all(sqrt(KF.processNoiseCov.at<float>(0, 0))));  
  83.             //state = KF.transitionMatrix*state + processNoise;  
  84.             //draw  
  85.             circle(showImg, statePt, 5, CV_RGB(255,0,0),1);//former point  
  86.             circle(showImg, predictPt, 5, CV_RGB(0,255,0),1);//predict point  
  87.             circle(showImg, mousePosition, 5, CV_RGB(0,0,255),1);//ture point  
  88.               
  89.   
  90. //          CvFont font;//字體  
  91. //          cvInitFont(&font, CV_FONT_HERSHEY_SCRIPT_COMPLEX, 0.5f, 0.5f, 0, 1, 8);  
  92.             putText(showImg, "Red: Former Point", cvPoint(10,30), FONT_HERSHEY_SIMPLEX, 1 ,Scalar :: all(255));  
  93.             putText(showImg, "Green: Predict Point", cvPoint(10,60), FONT_HERSHEY_SIMPLEX, 1 ,Scalar :: all(255));  
  94.             putText(showImg, "Blue: Ture Point", cvPoint(10,90), FONT_HERSHEY_SIMPLEX, 1 ,Scalar :: all(255));  
  95.   
  96.             imshow( "Kalman", showImg );  
  97.             int key = waitKey(3);  
  98.             if (key == 27)  
  99.             {  
  100.                 break;  
  101.             }  
  102.         }  
  103. }  

主要資料:

1.維基百科:http://en.wikipedia.org/wiki/Kalman_filter(英文)

    中文:http://zh.wikipedia.org/wiki/%E5%8D%A1%E5%B0%94%E6%9B%BC%E6%BB%A4%E6%B3%A2#.E5.8D.A1.E5.B0.94.E6.9B.BC.E6.BB.A4.E6.B3.A2.E5.99.A8

2.OpenCV文檔:http://docs.opencv.org/modules/video/doc/motion_analysis_and_object_tracking.html?highlight=kalman#kalmanfilter

3.博客園kalman詳解blog:http://www.cnblogs.com/feisky/archive/2009/12/04/1617287.html

4.CSDN kalman.cpp講解yangxian:http://blog.csdn.net/yang_xian521/article/details/7050398

5.CSDN 鼠標跟蹤:http://blog.csdn.net/onezeros/article/details/6318944

6.模型論文:http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf
 

發佈了9 篇原創文章 · 獲贊 8 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章