bakeup
This commit is contained in:
@ -138,7 +138,7 @@ class TrackFrag:
|
||||
return False
|
||||
|
||||
|
||||
def is_static(self):
|
||||
def is_static(self, THRESH=50):
|
||||
box1 = self.boxes[0, :4]
|
||||
box2 = self.boxes[-1, :4]
|
||||
|
||||
@ -148,7 +148,7 @@ class TrackFrag:
|
||||
ptd2 = np.linalg.norm((ptd[2], ptd[1]))
|
||||
ptd3 = np.linalg.norm((ptd[0], ptd[3]))
|
||||
ptd4 = np.linalg.norm((ptd[2], ptd[3]))
|
||||
condt1 = ptd1<50 and ptd2<50 and ptd3<50 and ptd4<50
|
||||
condt1 = ptd1<THRESH and ptd2<THRESH and ptd3<THRESH and ptd4<THRESH
|
||||
|
||||
if not self.isCornpoint:
|
||||
self.trajdist_min < 120
|
||||
@ -179,16 +179,22 @@ class MoveDetect:
|
||||
|
||||
tracks = self.tracks
|
||||
|
||||
'''减去静止轨迹'''
|
||||
'''1. 提取手部轨迹轨迹'''
|
||||
hand_tracks = [t for t in tracks if t.cls==0]
|
||||
tracks = self.sub_tracks(tracks, hand_tracks)
|
||||
|
||||
'''2. 提取静止轨迹'''
|
||||
tracks_static = [t for t in tracks if t.is_static()]
|
||||
tracks = self.sub_tracks(tracks, tracks_static)
|
||||
|
||||
|
||||
'''更新轨迹点聚类'''
|
||||
'''3. 更新轨迹点聚类'''
|
||||
for track in tracks:
|
||||
track.update_groups(18)
|
||||
|
||||
|
||||
self.hand_tracks = hand_tracks
|
||||
self.track_motion = [t for t in tracks if len(t.groups)>=3]
|
||||
|
||||
|
||||
|
||||
def draw(self):
|
||||
|
Reference in New Issue
Block a user