def init_firstframe_by_grdtruth():
global updtbox, oldbox, crtbox
gtfile = open(imdb_path+'/'+'groundtruth_rect.txt','r')
line = gtfile.readline()
points = line[:-1].split(',')
points = map(int, points)
points[2] += points[0]
points[3] += points[1]
gtfile.close()
crtbox = points
updtbox = crtbox
oldbox = crtbox
img = cv2.imread(imdb_path+'/0001.jpg')
tracker.start_track(img, dlib.rectangle(*crtbox))
评论列表
文章目录