• 沒有找到結果。

第五章 視覺追蹤方法

5.1 標記系統擴增實境

5.1.5 產生虛擬物件

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

40

點的角點座標,以標記圖形中心點為特徵原點,其餘四點為標記圖形的角點,座 標個別為中點:(0,0,0)、左上:(-1.25,1.25,0)、右上:(1.25,1.25,0)、左下(-1.25,-1.25,0)、

右下(1.25,-1.25,0)為標記圖形的座標軸系統,我們將這個座標軸系統對應至三維

空間中,標記圖形的三維座標,需要將原始的座標軸系統作座標轉換,對應到我

們系統中所使用的三維座標系統,因此,我們必頇要取得座標系統的旋轉以及位

移,讓虛擬物件也能轉換置與標記圖形具有相同的旋轉位移的效果,為了達到這

個目的,使用上節所述 Arun 的方法,取得旋轉以及位移的轉換矩陣,將虛擬物

件的每個點乘上座標轉換的旋轉矩陣加上位移向量,及可將物體與標記圖形作關

連。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

41

第六章 實驗結果

6.1 無標記系統影像追蹤實驗

我們希望藉由本實驗發現目前處理視覺追蹤會遇到的一些問題,我們實驗的資 料大小為 512x240 長約 1 分鐘的短片,實驗流程如圖所示(圖 28)。

首先,使用

Harris 角點偵測法(Harris corner detector)找尋影片中邊角較明顯的

點作為特徵點,將特徵點萃取後設為本實驗欲追蹤物體的點。接著我們將在欲追 蹤的特徵點框選一個已特徵點為中心,大小為 10x10 的搜尋視窗範圍(search window size)並且採用 ZNCC 為計算前後影格之追蹤點的區域影像相似度,計算 出來的數值越高並且為正值代表其正相關相似度越高,而數值低但為正值代表是 低度正相關,反之,數值越高並且為負值代表為負相關。接著我們所選擇的特徵 點局部區域大小為 5x5,我們將在搜尋視窗範圍(search window size)內搜尋相似 度較高並且為正相關的 ZNCC 值之特徵點為該追蹤點的對應點,並且該點必頇 大於等於 ZNCC 相似度值 0.8 才將之視為正確的對應點,若該對應點之 ZNCC 相似度值小於 0.8,我們將此點視為追蹤錯誤的點,當追蹤錯誤的點累積至全部 點的 1/4(在此實驗的數據為 7 點),我們將重新使用

Harris 角點偵測法抓取特徵

點並重新做追蹤,實驗結果如圖(圖 29、圖 30),對應點很容易受外在環境影響

而追蹤錯誤。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

42 影片輸入

使用Harris角點偵測法找追蹤點

使用ZNCC法於 搜尋範圍中找對應點

當ZNCC值<0.8紀錄該點 為追蹤錯誤的追蹤點

追蹤錯誤的點>

所有特徵點的1/4

影片結束

追蹤完畢

圖 28 影像追蹤實驗流程

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

43

圖 29 影像追蹤實驗影像(一)

圖 30 影像追蹤實驗影像(二)

在實驗中我們發現若要追蹤的物體移動速度過於快速,使得追蹤物體在單位時 間內位移量過大,也就是位移量超過搜尋視窗範圍(search window size)所能追蹤 的距離,將會導致該物體追蹤不到或者追蹤錯誤的狀況發生;此外,本實驗採用 ZNCC 計算前後影格之追蹤物體的區域圖像相似度來做追蹤的方法,透過 ZNCC 追蹤物體有可能會產生影像區域因為光照改變、追蹤物體受其他物體遮蔽…等外 在因素影響,導致對應點追蹤至不同的區域但其計算出來的 ZNCC 相似值高的 錯誤狀況發生,又或者因為遮蔽的關係,使得計算出來的 ZNCC 值低於我們所 假定判別為錯誤點之 ZNCC 值,但有時只是因為暫時遮蔽的關係而造成短暫的

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

44

追蹤錯誤,在此,使用此方法則無法避免這種狀況。另一個問題在於我們所採取 的搜尋視窗範圍(search window size)以及選擇局部特徵點大小作 ZNCC 的區域為 矩形,我們使用矩形來近似欲追蹤的區域,但物體移動的過程中往往會產生角度 的旋轉、位移、縮放使得欲追蹤的區域所呈現的方式並非為一矩形,這樣將會造 成 ZNCC 比對上的誤差使得對應點追錯的情況發生(圖 31)。

另外,搜尋視窗範圍(search window size)以及追蹤點的區域大小給定將會隨著 影片的不同而各有不同適合的參數值,很難從中做搜尋視窗範圍(search window size)以及追蹤點區域大小的界定。

6.2 使用多個標記圖形擴增實境實驗

本實驗目的希望使用三個以上的標記圖形,得知於 t-1 時間的旋轉矩陣以及位 移矩陣,推得 t 時間物體的位置,並畫上虛擬物件,來判斷其成果是否正確。

實驗環境,使用雙眼攝影機及時擷取影像解析度 1600x1200 大小的序列影像,

採用四個長寬各為 2.5cm 的標記圖形,放置於桌面上(圖 32),藉由我們的方法,

我們可以求算出四個標記圖形的相對三維座標位置(圖 33、圖 35),我們使用三 個於 t-1 時間的三維座標點帶入 Arun’s method 求得三點計算出來的旋轉矩陣以及 位移矩陣,使用 RANSAC 選出一個最佳解,並將 t-1 的時間三維座標點乘上旋

圖 31 因角度旋轉、位移、縮放,造成 ZNCC 比對誤差

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

45

轉矩陣以及位移矩陣估算 t 時間的位置,畫上虛擬物件(圖 34、圖 36),實驗顯示 其虛擬物件皆有準確畫在 T 字標記圖形之上,且旋轉方向與位移均與標記圖形 同步,此外,當有一個標籤被遮蔽,此方法仍然可以藉由其他標記圖形推估出正 確的位置(圖 37、圖 38)。

圖 32 使用四個標記圖形作測試,T 字標記圖形為繪製虛擬物件的中心標記

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

46

圖 33 標記圖形辨識且計算三維空間座標(I)

圖 34 對應上圖,於 T 字標記圖形繪製虛擬物件,並且方向與標記圖形方向相同

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

47

圖 35 標記圖形辨識且計算三維空間座標(II)

圖 36 對應上圖,於 T 字標記圖形繪製虛擬物件,並且方向與標記圖形方向相同

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

48

圖 37 當一個標記圖形遮蔽狀況

圖 38 當一個標記圖形遮蔽,可以藉由其他標記圖形推估位置,並且繪製虛擬物件

測試帄台,Genuine Intel(R) CPU T2300 @1.66GHz、RAM 0.99GB 997MHz,

相機規格,羅技 C905 最大解析度為 1600x1200,隨實驗測試解析度將有所變 動。為了方便敘述,我們定義實驗中的標記圖形代號如下表(表 1)

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

53

圖 39 可視範圍實驗環境

由上述實驗可得知可視距離隨著相機解析度大小、標識圖形大小有所增加,根 據可視距離大小,可以來調整使用的應用性。

6.3.2 標記圖形角度可視範圍實驗

本實驗的目的為測量標記圖形的可視角度範圍,藉由調整角度取得各種不同角 度的可視範圍,我們將固定標記圖形大小為 2.5cm、解析度大小為 1600x1200,

固定拍攝距離為 20cm,由和標記圖形與相機呈現正拍狀態,也就是標記圖形和 相機呈現 0 度角的狀態,每次角度移動 10 度,記錄辨識率,實驗結果如下表(表 7),

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

55

光照(lux) 拍攝畫面數(frame) 成功偵測數(frame) 辨識成功率

4.8 500 0 0

18 500 457 0.914

46.7 500 463 0.926

65.5 500 481 0.962

131 500 500 1

252 500 500 1

291 500 500 1

1376 500 483 0.966

7310 500 471 0.942

表 8 標記圖形光照辨識成功率表

在 18~7310(lux)都可正常辨識,其中 18(lux)為一般室內不開燈的狀況,而 7310(lux) 為戶外的狀況。

6.3.4 標記圖形辨識時間測量實驗

測量標記圖形的辨識時間,藉由調整解析度大小以及特徵個數,取得辨識特徵 的時間,固定標記圖形大小為 2.5cm,實驗結果如下表(表 9),

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

63

3. 本研究的標記圖形於光照變化的狀況依然可以辨識,但於被遮蔽的容錯能力 較差,未來希望能在加強本研究標記圖形的容錯能力、抗外部雜訊的能力,

期望標記圖形能在部分遮蔽,具有多種雜訊的狀況之下還能準確辨識。

4. 本研究探討的是使用立體視覺作追蹤定位,別於傳統使用單一相機作視覺追 蹤,未來希望能將立體視覺應用於非標記圖形的追蹤上,結合其他特徵比對 的方法,例如 SIFT、SURF…等,期望能不使用標記圖形即可準確追蹤物體。

5. 本研究以多個標記圖形來達到強健式追蹤,未來希望能將多個標記追蹤的特 色融合在一個標記之中,使用一個標記圖形,但其中帶有多樣化的特徵,達 到使用一個標記圖形,也能精準追蹤物體。

ARToolKit for display of haptic applications," Proceedings of 2nd IEEE

International Augmented Reality Toolkit Workshop, pp. 1-2, 2003.

[2] K. S. Arun, T. S. Huang, and S. D. Blostein, "Least-Squares Fitting of Two 3-D Point Sets," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-9, pp. 698-700, 1987.

[3] R. T. Azuma, "A survey of augmented reality," Presence-Teleoperators and

Virtual Environments, vol. 6, pp. 355-385, 1997.

[4] H. Bay, T. Tuytelaars, and L. Van Gool, "Surf: Speeded up robust features,"

Proceedings of European Conference on Computer Vision, pp. 404-417, 2006.

[5] W. Broll, I. Lindt, I. Herbst, J. Ohlenburg, A. K. Braun, and R. Wetzel, "Toward Next-Gen Mobile AR Games," Journal of IEEE Computer Graphics and

Applications, vol. 28, pp. 40-48, 2008.

[6] V. F. da Camara Neto, D. Balbino de Mesquita, R. F. Garcia, and M. F. M.

Campos, "On the Design and Evaluation of a Precise Scalable Fiducial Marker Framework," Conference on 23rd SIBGRAPI Graphics, Patterns and Images, pp.

216-223, 2010.

[7] L. Di Stefano, S. Mattoccia, and F. Tombari, "ZNCC-based template matching using bounded partial correlation," Pattern Recognition Letters, vol. 26, pp.

2129-2134, 2005.

[8] M. Fiala, "ARTag, a fiducial marker system using digital techniques,"

Conference on Computer Vision and Pattern Recognition, vol. 2, pp.

590-596 ,2005.

[9] M. Fiala, "Designing Highly Reliable Fiducial Markers," IEEE Transactions on

Pattern Analysis and Machine Intelligence, vol. 32, pp. 1317-1324, 2010.

[10] J. Fischer, M. Eichler, and D. Bartz, "A hybrid tracking method for surgical augmented reality," Computers and Graphics, vol. 31, pp. 39-52, 2007.

[11] M. A. Fischler and R. C. Bolles, "Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography,"

Communications of the ACM, vol. 24, pp. 381-395, 1981.

[12] D. Flohr and J. Fischer, "A lightweight ID-based extension for marker tracking

systems," Proceedings of Eurographics Symposium on Virtual Environments, pp.

59-64, 2007.

[13] Y. Genc, S. Riedel, F. Souvannavong, C. Akinlar, and N. Navab, "Marker-less tracking for AR: a learning-based approach," Proceedings of International

Symposium on Mixed and Augmented Reality, pp. 295-304, 2002.

[14] H. Grabner, J. Matas, L. Van Gool, and P. Cattin, "Tracking the invisible:

Learning where the object might be," IEEE Conference on Computer Vision and

Pattern Recognition, pp. 1285-1292, 2010.

[15] G. D. Hager and P. N. Belhumeur, "Real-time tracking of image regions with changes in geometry and illumination," Proceedings of Computer Vision and

Pattern Recognition, pp. 403-410, 1996.

[16] C. Harris and M. Stephens, "A Combined Corner and Edge Detection,"

Proceedings of The Fourth Alvey Vision Conference, pp. 147-151, 1988.

[17] H. Kato and M. Billinghurst, "Marker tracking and HMD calibration for a video-based augmented reality conferencing system," Proceedings of the 2nd

International Workshop on Augmented Reality, pp. 85-94, 1999.

[18] D. Lowe, "Distinctive image features from scale-invariant keypoints,"

International Journal of Computer Vision, vol. 60, pp. 91-110, 2004.

[19] D. Marissa, A.-M. Moises, M.-G. Lourdes, and R. Isaac, "Multi-User Networked Interactive Augmented Reality Card Game," Proceedings of International

Conference on Cyberworld , pp. 177-182, 2006.

[20] W. Piekarski and B. H. Thomas, "Using ARToolKit for 3D hand position tracking in mobile outdoor environments," Proceedings of The First IEEE

International Augmented Reality Toolkit Workshop, pp. 2 , 2002.

[21] Z. Qi, S. Brennan, and T. Hai, "Differential EMD Tracking," Proceedings

of International Conference on Computer Vision, pp. 1-8, 2007.

[22] G. Reitmayr and T. W. Drummond, "Going out: robust model-based tracking for outdoor augmented reality," Proceedings of International Symposium on Mixed

and Augmented Reality, pp. 109-118, 2006.

[23] T. Sielhorst, M. Feuerstein, and N. Navab, "Advanced Medical Displays: A Literature Review of Augmented Reality," Journal of Display Technologyf, vol.

4, pp. 451-467, 2008.

[24] G. Silveira and E. Malis, "Real-time Visual Tracking under Arbitrary Illumination Changes," Proceedings of Computer Vision and Pattern

Recognition, pp. 1-6, 2007.

[25] L. Taehee and T. Hollerer, "Handy AR: Markerless Inspection of Augmented Reality Objects Using Fingertip Tracking," Proceedings of the 2007 11th IEEE

International Symposium on Wearable Computers, pp.1-8, 2007.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

66

[26] L. Taehee and T. Hollerer, "Multithreaded Hybrid Feature Tracking for Markerless Augmented Reality," IEEE Transactions on Visualization and

Computer Graphics , vol. 15, pp. 355-368, 2009.

[27] D. Wagner and D. Schmalstieg, "Artoolkitplus for pose tracking on mobile devices," Proceedings of 12th Computer Vision Winter Workshop, pp. 6-8, 2007.

[28] Z. Xiang, S. Fronz, and N. Navab, "Visual marker detection and decoding in AR systems: a comparative study," Proceedings of the 1st International Symposium

on Mixed and Augmented Reality, pp. 97-106, 2002.

[29] S. You and U. Neumann, "Mobile Augmented Reality for Enhancing E-Learning and E-Business," International Conference on Internet Technology and

Applications , pp. 1-4, 2010.

[30] J.-Y. Bouguet.

Camera Calibration Toolbox for Matlab.

www.vision.caltech.edu/bouguetj/calib_doc/

相關文件