diff --git a/samples/opencv_cuda_bg_remover_mog2/bgremover.py b/samples/opencv_cuda_bg_remover_mog2/bgremover.py index 711ca175..c5992b78 100644 --- a/samples/opencv_cuda_bg_remover_mog2/bgremover.py +++ b/samples/opencv_cuda_bg_remover_mog2/bgremover.py @@ -99,7 +99,9 @@ def process_frame(self, buffer: Gst.Buffer, frame_meta: NvDsFrameMeta): frame_mat_copy = frame_mat.clone() back_sub = self.back_subtractors[frame_meta.source_id] - self.gaussian_filter.apply(frame_mat_copy, frame_mat_copy, stream=stream) + self.gaussian_filter.apply( + frame_mat_copy, frame_mat_copy, stream=stream + ) cu_mat_fg = back_sub.apply(frame_mat_copy, -1, stream) res_image = frame_mat_copy.copyTo(cu_mat_fg, stream) diff --git a/samples/super_resolution/overlay.py b/samples/super_resolution/overlay.py index 38d3495f..e108ff08 100644 --- a/samples/super_resolution/overlay.py +++ b/samples/super_resolution/overlay.py @@ -99,9 +99,17 @@ def process_frame(self, buffer: Gst.Buffer, frame_meta: NvDsFrameMeta): ) # Place original frame and super resolution frame side by side - opencv_utils.alpha_comp(aux_mat, scaled_image, (0, 0), cuda_stream) opencv_utils.alpha_comp( - aux_mat, sr_image_np, (sr_image_np.shape[1], 0), cuda_stream + aux_mat, + scaled_image, + (0, 0), + stream=cuda_stream, + ) + opencv_utils.alpha_comp( + aux_mat, + sr_image_np, + (sr_image_np.shape[1], 0), + stream=cuda_stream, ) else: self.logger.warning('Super resolution attribute not found.')