apply_cuda_filter
- savant.deepstream.opencv_utils.apply_cuda_filter(cuda_filter, frame, roi, stream=None)
Apply CUDA filter to a frame in place.
Usage example:
gaussian_filter = cv2.cuda.createGaussianFilter( cv2.CV_8UC4, cv2.CV_8UC4, (31, 31), 100, 100 ) with nvds_to_gpu_mat(gst_buffer, nvds_frame_meta) as frame_mat: # Blur specified area of the frame with gaussian blur apply_cuda_filter(gaussian_filter, frame_mat, (300, 400, 100, 200))