本研究提出一套自動對影片中物體軌跡做追蹤記錄的方法。首先,針對影片中第一張影格(Frame)使用Canny邊緣偵測和Hough直線偵測來找出畫面中物體活動場地中標的線段以取得主場地位置。再利用主場地位置統計出其主要顏色成分,接著以此主要顏色成分和畫面中物體移動資訊找出物體在影片開始時起始位置。另外利用標的線段計算作為投影座標轉換公式參數計算之用的四組鏡頭座標系座標點。利用前面找出的物體初始位置,搭配以Mean Shift和Particle Filter交互使用的追蹤演算法,對於畫面中移動物體進行追蹤動作。追蹤之後記錄下來的鏡頭座標系軌跡,再利用投影轉換公式轉換至真實世界座標系,並將之儲存在資料庫。系統另外提供查詢介面供使用者以適當的方式將之前追蹤軌跡結果調閱。 影像中物體移動軌跡資訊可以在各領域中提供廣泛延伸應用,如視訊資料庫(Video Database)裡影片檢索,或保全系統(Surveillance System)、軍事系統(Military System)中入侵物行為分析。另外如運動比賽中,球員或球的軌跡,不管是戰術資料分析或是統計,都可以提供分析參考依據。
This work aims to track object and construct trajectory automatically, from a single fixed camera. First, we process the first frame of inputted video with Canny edge detector and Hough transformation to find the position of ROI area. We use the ROA area to find out the dominant color. Then target objects are segmented with the dominant color and object motion information. The eight parameters of perspective transformation are also calculated by the border of ROI area. The object tracking task is done by the Mean Shift – Particle Filter approach. The result object trajectory is converted from camera coordinate to world coordinate by perspective transformation, and then store in database. The system also provides interface to user to query the trajectories constructed. The object trajectories can be applied to several applications in different area, such as Video Database, Surveillance System, Military System. In the sport science area, players trajectories can be used for tactics analysis or players training.