Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(shotdetect): fix bug with thre_algo
Browse files Browse the repository at this point in the history
  • Loading branch information
raccoonliukai committed Sep 27, 2019
1 parent b69591d commit a6d1484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnes/preprocessor/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def motion_algo(distances: List[float], **kwargs) -> List[int]:
shots.append(p[0] + 2 + 1)
for i in range(1, len(p)):
# We check that the peak is not due to a motion in the image
valid_dist = arg_dict['motion_step'] or not check_motion(distances[p[i]-arg_dict['motion_step']:p[i]], distances[p[i]])
valid_dist = not arg_dict['motion_step'] or not check_motion(distances[p[i]-arg_dict['motion_step']:p[i]], distances[p[i]])
if valid_dist:
shots.append(p[i] + 2 + 1)
if shots[-1] < num_frames - arg_dict['min_dist']:
Expand Down

0 comments on commit a6d1484

Please sign in to comment.