Fix None prevKeyPoints for multi-object tracking (#9386)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
1ca14a9ad0
commit
6a25fb243d
1 changed files with 1 additions and 1 deletions
|
|
@ -319,7 +319,7 @@ class GMC:
|
|||
keypoints = cv2.goodFeaturesToTrack(frame, mask=None, **self.feature_params)
|
||||
|
||||
# Handle first frame
|
||||
if not self.initializedFirstFrame:
|
||||
if not self.initializedFirstFrame or self.prevKeyPoints is None:
|
||||
self.prevFrame = frame.copy()
|
||||
self.prevKeyPoints = copy.copy(keypoints)
|
||||
self.initializedFirstFrame = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue