• 沒有找到結果。

以實際拍攝道路追蹤車輛的影片作為實驗影片,手動框選出車輛所在位置及大小,

並分別使用:Lucas-Kanade 光流法與 PSO-based LK 來作為比較,如圖 6.14 與圖 6.15 所 示。

0

th

Frame 10

th

Frame 20

th

Frame

30

th

Frame 40

th

Frame 50

th

Frame

60

th

Frame 70

th

Frame 80

th

Frame 圖 6.14、在交通車輛影片上,Lucas-Kanade 光流法實驗結果

Lucas-Kanade 光流法可能因環境因素(例如:光源變化、背景改變、追蹤物件變化 劇烈現象)導致追蹤框產生漂移或變形的現象,而在交通車輛影片中,車輛本身行進速 度快,且在於複雜的交通背景情況下(如:本身影子變化、週圍車輛行進,周遭大樓影 子),從圖 6.14 中發現,當第 10 張影像的時候,追蹤框已無法準確地追蹤車輛,導致後 面的追蹤結果都是錯誤的。然而使用 PSO-based LK 作物件追蹤,圖 6.15 中發現,當第 10 張影像時,雖然追蹤框形狀有點傾斜,但還是能有效地追蹤物件的位置,使得後面追 蹤的效果依然有效,從圖 6.16 中,兩種方法的 MSE 變化,可以清楚發現 Lucas-Kanade

光流法在第 0~10 張畫面時,MSE 已逐漸提升到非常大的值,而 PSO-based LK 卻能平 緩 MSE 值的變化,使 MSE 值不會有過大值的產生,有效達到物件追蹤的效果。

0

th

Frame 10

th

Frame 20

th

Frame

30

th

Frame 40

th

Frame 50

th

Frame

60

th

Frame 70

th

Frame 80

th

Frame 圖 6.15、在交通車輛影片上 PSO-based LK 之實驗結果圖

0 10 20 30 40 50 60 70 80

0 500 1000 1500 2000 2500 3000 3500

Frame number

MSE

LK PSO-LK

圖 6.16、交通車輛影片中 PSO-based LK 與 Lucas-Kanade 光流法之 MSE 值比較

比對 Lucas-Kanade 光流法與 PSO-based LK 的參數 p 個個參數值變化,如圖 6.17~6.20 所示,Lucas-Kanade 光流法在第 10 張影像時參數 p 已無法準確估計出正確值 來追蹤車輛,如圖 6.17 與圖 6.18 所示,圖 6.17 可以觀察到在第 10 張影像後,參數

p 1

~

p 4

已開始出現錯誤計算的情形產生,而圖 6.18 發現,在第 0~10 張影像時,參數 p 及

5

p 並

6

沒有出現變化,追蹤框出現靜止不動的情況發生,而可以看出 Lucas-Kanade 光流法已無 法準確地追蹤到車輛位置,導致後面的追蹤出現錯誤追蹤的情形。

0 10 20 30 40 50 60 70 80

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Frame number

Parameter value

p1 p2 p3 p4

圖 6.17、在交通車輛影片上 Lucas-Kanade 光流法之參數

p 1

~

p 4

變化

0 10 20 30 40 50 60 70 80

-50 0 50 100 150 200 250 300

Frame number

Parameter value

p5 p6

圖 6.18、在交通車輛影片上 Lucas-Kanade 光流法之參數p 與

5

p 變化

6

PSO-based LK 能更新出比 Lucas-Kanade 光流法更精準的參數p 用於物件追蹤上,

如圖 6.19 與圖 6.20 所示,從圖 6.19 發現參數

p 1

~

p 4

,能隨著影片中車輛的遠離拍攝裝 置的行為,車輛本身逐漸變小,使得參數

p 1

p 4

有下降的趨勢,圖 6.20 發現,在第 0~10 張影像中,參數p 與

5

p 不會出現 Lucas-Kanade 光流法中參數沒有變化的現象,參數

6

p

5

p 隨著影片中的車輛行進方向產生變化。

6

0 10 20 30 40 50 60 70 80

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

Frame number

Parameter value

p1 p2 p3 p4

圖 6.19、在交通車輛影片上,PSO-based LK 之參數

p 1

~

p 4

變化

0 10 20 30 40 50 60 70 80

-50 0 50 100 150 200 250 300

Frame number

Parameter value

p5 p6

圖 6.20、在交通車輛影片上,PSO-based LK 之參數p 與

5

p 變化

6

從參數變化的過程發現,使用 PSO 更新方式使得 Lucas-Kanade 光流法較不容易受 環境因素的影響導致錯誤追蹤,而針對參數p 與

5

p 使用 PSO 更新比較於 Lucas-Kanade

6

光流法來得有效,並且使得參數

p 1

~

p 4

在於有效的參數 p 與

5

p 更新下,也能有更精準

6

的變化。

第 7 章 結論

物件追蹤(object tracking)在電腦視覺中是一門很熱門的研究主題,經常使用於智慧 型交通系統、人機介面、臉部辨識等…。本論文主要探討 Lucas-Kanade 光流法用於物件 追 蹤 的 穩 定 性 , 並 且 介 紹 如 何 透 過 軟 式 計 算 中 粒 子 群 聚 最 佳 化 演 算 法 來 達 到 Lucas-Kanade 光流法更穩定的追蹤效果。

Lucas-Kanade 光流法相較於背景相減法及連續影像相減這兩種方面來的有效,主要 原因在於 Lucas-Kanade 光流法較不容易受到背景變化因素干擾以及追蹤物件本身大小 形狀變化的因素而導致無法正確追蹤,然而 Lucas-Kanade 光流法雖較能有效追蹤,但在 過多的背景干擾還是會有錯誤追蹤的情形產生。而主要可能產生錯誤追蹤的情況如下:

(1) 當在樣版影像中的物件本身出現雜訊時 (2) 當偵測物件變化過大過快時

(3) 當偵測物件本身受光影變化過於劇烈時 (4) 當拍攝裝置搖晃時

為了改善傳統 Lucas-Kanade 光流法的精確度,在使用 Lucas-Kanade 光流法之前,

先以粒子群聚最佳化進行估測,在本論文第 5 章節,提出如何藉由粒子群聚最佳化 (particle swarm optimization, PSO)計算出一組參數能夠使傳統 Lucas-Kanade 光流法在有 效範圍內計算出參數避免產生發散或是落入區域最小值的情形出現,此方法稱為 PSO-based LK,而從第 6 章的各種實驗結果可以發現,使用 PSO 能改善傳統 Lucas-Kanade 光流法在追蹤物件時追蹤框不會有過度的搖晃起伏,並且對於追蹤物件在較為複雜的背 景及動作下也能有穩定的追蹤效果。

參考文獻

[1] B. D. Lucas and T. Kanade, “An iterative image registration technique with an application to stereo vision,” application to stereo vision, in: Proc. of the International Joint Conference on Artificial Intelligence, Canada, pp. 674–679, Aug., 1981.

[2] S. Baker and I. Mattews, “Lucas-Kanade 20 years on: a unifying framework,”

International Journal of Computer Vision, vol. 56, no. 3, pp. 221-255, 2004.

[3] Berthold K.P. Horn and Brian G. Schunck, “Determining optical flow,” Artifcial Intelligence, pp. 185-203, 1981.

[4] H. H. Nagel, “On the estimation of optical flow: relations between different approaches and some new results,” Artifcial Intelligence, vol. 33, no. 3, Nov., 1987.

[5] P. Anandan, “A computational framework and an algorithm for the measurement of visual motion,” International Journal of Computer Vision, vol. 2, no. 3, pp. 283-310, 1988.

[6] Heeger D. J, “Optical flow using spatiotemporal filters,” International Journal of Computer Vision, vol. 1, no. 4, pp. 279-302, 1987.

[7] D. J. Fleet and A. D. Jepson, “Computation of component image velocity from local phase information,” International Journal of Computer Vision, vol. 5, no. 1, pp. 77-104, 1990.

[8] L. Matthews, T. Ishikawa, and S. Baker, “The template update problem,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, no. 6, pp. 810-815, Jun., 2004.

[9] S. Lim, J. G. Apostolopoulos, and A. E. Gamal, “Optical flow estimation using temporally oversampled video,” IEEE Transactions on Image Processing, vol. 14, no. 8, pp. 1074-1087, Aug., 2005.

[10] J. Zhu, M. R. Lyu, and T. S. Huang, “A fast 2D shape recovery approach by fusing features and appearance,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 31, no. 7, pp. 1210-1224, Jul., 2009.

[11] T. Marco, “A genetic algorithm for optical flow estimation,” Image and Vision Computing, vol. 25, no. 2, pp. 141-147, Jan., 2006.

[12] N. Dowson and R. Bowden, “Mutual information for Lucas-Kanade tracking (MILK): an inverse compositional formulation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 1, pp. 180-185, Jan., 2008.

[13] D Schreiber, “Generalizing the Lucas-Kanade algorithm for histogram-based tracking,”

Pattern Recognition Letters, vol. 29, vol. 7, pp. 852-861, May., 2008.

[14] P. Sungsoo and K. Daijin, “Subtle facial expression recognition using motion magnification,” Pattern Recognition Letters, vol.30, no. 7, pp. 708-716, May., 2008.

[15] D Schreiber, “Incorporating symmetry into the Lucas-Kanade framework,” Pattern Recognition Letters, vol. 30, no. 7, pp. 690-698, May., 2009.

[16] D. Cobzas, M. Jagersand, and P. Sturm, “3D SSD tracking with estimated 3D planes,”

image and vision computing , pp. 69-79, 2009.

[17] A. Sánchez, J. V. Ruiz, A. B. Moreno, A. S. Montemayor, J. Hernández, and J.J. Pantrigo,

“Differential optical flow applied to automatic facial expression recognition,” in Press Corrected Proof, Available online 20, Oct., 2010.

[18] J. Kennedy, and R. C. Eberhart, “Particle swarm optimization,” in: Proc. IEEE Int. Conf.

on Neural Networks, Perth, Australia, vol. 4, pp. 1942-1948, 1995.

[19] R. C. Eberhart, and J. Kennedy, “A new optimizer using particle swarm theory,” in: Proc.

IEEE Int. Symposium on Micro Machine and Human Science, Nagoya, Japan, pp. 39-43, 1995.

相關文件