﻿ 基于轨迹聚类的超市顾客运动跟踪
 文章快速检索 高级检索

1. 浙江大学 计算机科学与技术学院, 浙江 杭州 310027;
2. 浙江省网络系统及信息安全重点实验室, 浙江 杭州 310006

Trajectory clustering based customer movement tracking in a supermarket
WANG Xi1, WU Wei2, QIAN Yuntao1
1. College of Computer Science, Zhejiang University, Hangzhou 310027, China;
2. Zhejiang Key Laboratory of Network Technology and Information Security, Hangzhou 310006, China
Abstract: Tracking the moving targets in complex scenarios such as supermarkets can be a challenging task. This paper proposes a method to track moving customers in a supermarket by clustering the trajectories of the targets. In this method, all the background and short-time feature points are removed in the preprocessing step in order to refine the feature points, which were detected and tracked by the Kanade-Lucas-Tomasi (KLT) algorithm. The occlusion problem of single frame static feature point clustering is solved by applying the mean shift algorithm to the trajectories of moving objects. Finally, the full trajectories of moving customers are generated by the matching algorithm of movement tracking. The algorithm tackles the stable tracking problem by optimally matching the feature point clusters between successive frames when the target goes across the boundary of the video region or has a complex trajectory. Experimental results showed that the proposed method can successfully track the trajectories of customers in various typical regions of the supermarket such as entrance, fresh area and checkout stand. This method is robust under partial occlusion, complex trajectory and asynchronous moving.
Key words: object tracking     feature matching     trajectory clustering     feature point refining

1 特征点轨迹提取及预处理 1.1 特征点轨迹提取

1.2 特征点轨迹预处理

1.2.1 滤除背景特征点

1)for all traj in trajSet

2)    按照式(3)计算轨迹连续静止长度L

3)    ifL>s

4)      trajSet←trajSet－ {traj}

5)    end if

6)end for

1.2.2 滤除短时特征点

2 轨迹聚类

1)while丨trajSetIn丨 ≠0

2)    从trajSetIn中随机选择一条未被聚类的轨迹kTraj作为聚类中心轨迹的初值

3)    while true

4)      lastKTraj←kTraj

5)      取X、Y方向的带宽分别为bx、 by，按式(6)计算本次迭代的聚类中心轨迹kTraj

6)      计算kTraj与lastKTraj在X、Y方向上的平均距离Δx、Δy

7)      ifΔx<e andΔy<e

8)        在X、Y方向上离kTraj距离小于bx,by的轨迹集合trajCluster标记为新的类

9)        trajSetIn ← trajSetIn—trajCluster

10)         trajSetOut ← trajSetOut ∪ trajCluster

11)         break

12)      end if

13)    end while

14)end while

3 目标运动跟踪

Ni：特征点类i中被匹配的特征点个数。

1)初始化Ni为0

2)for all CC in currentSet

3)    for all LC in lastSet

4)      n ← 丨CC∩LC丨

5)      ifn>α 丨CC丨andn>NLC

6)        更新特征点类LC的匹配类为CC

7)      end if

8)    end for

9)end for

10)for all CC in currentSet

11)    ifNCC=0

12)      将特征点类CC标记为独立类

13)    end if

14)end for

4 实验结果与分析

KLT特征点提取的结果如图 1所示，视频中每帧提取的特征点个数为2 000，任意2个特征点之间的最小距离为5像素。从图 1中可以看出，特征点不仅分布在运动的顾客身上，也广泛的分布于纹理特征较为明显的背景之中。

 图 1 KLT特征点提取Fig. 1 Detecting KLT feature points

 图 2 特征点轨迹预处理Fig. 2 Preprocessing trajectories of feature points

 图 3 meanshift轨迹聚类Fig. 3 Trajectory clustering by meanshift

 图 4 运动跟踪，超市入口，单人Fig. 4 Movement tracking： single customer at the entrance
 图 5 运动跟踪，超市入口，多人Fig. 5 Movement tracking： multiple customers at the entrance
 图 6 运动跟踪，生鲜区域，多人Fig. 6 Movement tracking： multiple customers at the fresh area
 图 7 运动跟踪，收银台，多人Fig. 7 Movement tracking：multiple customers at the check stand

5 结束语

 [1] YILMAZ A, JAVED O, SHAH M. Object tracking: a survey[J]. ACM Computing Surveys (CSUR), 2006, 38(4): 1-45. [2] BROIDA T J, CHELLAPPA R. Estimation of object motion parameters from noisy images[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1986(1): 90-99. [3] 万琴,王耀南 .基于卡尔曼滤波器的运动目标检测与跟踪[J]. 湖南大学学报:自然科学版, 2007, 34(3): 36-40.WAN Qin, WANG Yaonan. Moving objects detecting and tracking based on Kalman filter[J]. Journal of Hunan University: Natural Sciences, 2007, 34(3): 36-40. [4] VEENMAN C J, REINDERS M J, BACKER E. Resolving motion correspondence for densely moving points[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001, 23(1): 54-72. [5] BERTALM O M, SAPIRO G, RANDALL G. Morphing active contours[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22(7): 733-737. [6] SATO K, AGGARWAL J K. Temporal spatio-velocity transform and its application to tracking and interaction[J]. Computer Vision and Image Understanding, 2004, 96(2): 100-128. [7] COMANICIU D, RAMESH V, MEER P. Kernel-based object tracking[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2003, 25(5): 564-577. [8] ZHOU H, YUAN Y, SHI C. Object tracking using SIFT features and mean shift[J]. Computer Vision and Image Understanding, 2009, 113(3): 345-352. [9] 李培华.一种改进的MeanShift跟踪算法[J]. 自动化学报, 2007, 33(4): 347-354.LI Peihua. An improved Meanshift algorithm for object tacking[J]. Acta Automatica Sinica, 2007, 33(4): 347-354. [10] BENFOLD B, REID I. Stable multi-target tracking in real-time surveillance video[C]// 2011 IEEE Conference on Proceedings of the Computer Vision and Pattern Recognition (CVPR).Oxford, UK, 2011: 3457-3464. [11] ZACH C, GALLUP D, FRAHM J-M. Fast gain-adaptive KLT tracking on the GPU[C]// 08 IEEE Computer Society Conference on proceedings of the Computer Vision and Pattern Recognition Workshops.[S.l.], USA, 2008: 1-7. [12] SHI J, TOMASI C. Good features to track[C]//1994 IEEE Computer Society Conference on proceedings of the Computer Vision and Pattern Recognition. Seattle, WA, USA, 1994: 593-600. [13] HASHEMZADEH M, PAN G, WANG Y, et al. Combining velocity and location-specific spatial clues in trajectories for counting crowded moving objects[J]. International Journal of Pattern Recognition and Artificial Intelligence, 2012, 27(2):1-31. [14] LUCAS B D, KANADE T. An iterative image registration technique with an application to stereo vision[C]//Proceedings of the IJCAI. Vancouver, Canada, 1981: 674-679. [15] TOMASI C, KANADE T. Detection and tracking of point features[M]. [S.l.]:Carnegie Mellon Univ, 1991: 1-32. [16] BIRCHFIELD S. KLT: An implementation of the Kanade-Lucas-Tomasi feature tracker[EB/OL]. [2013-11-21]. http://www.ces.clemson.edu/~stb/klt/ [17] SUGIMURA D, KITANI K M, OKABE T, et al. Using individuality to track individuals: clustering individual trajectories in crowds using local appearance and frequency trait[C]//2009 IEEE 12th International Conference on Proceedings of the Computer Vision. Kyoto, Japan, 2009: 1467-1474. [18] BROX T, MALIK J. Object segmentation by long term analysis of point trajectories[M]. Springer. 2010: 282-295.
DOI: 10.3969/j.issn.1673-4785.201401002

0

#### 文章信息

WANG Xi, WU Wei, QIAN Yuntao

Trajectory clustering based customer movement tracking in a supermarket

CAAI Transactions on Intelligent Systems, 2015, 10(02): 187-192.
DOI: 10.3969/j.issn.1673-4785.201401002