Catch none frame in autotracking

This commit is contained in:
Nicolas Mowen 2024-09-03 10:14:13 -06:00
parent 6dc7e9a76c
commit bcfd13ff73

View File

@ -99,6 +99,10 @@ class PtzMotionEstimator:
frame_id, self.camera_config.frame_shape_yuv frame_id, self.camera_config.frame_shape_yuv
) )
if yuv_frame is None:
self.coord_transformations = None
return None
frame = cv2.cvtColor(yuv_frame, cv2.COLOR_YUV2GRAY_I420) frame = cv2.cvtColor(yuv_frame, cv2.COLOR_YUV2GRAY_I420)
# mask out detections for better motion estimation # mask out detections for better motion estimation