• Hardware Platform: GPU
• DeepStream Version: 7.1
• NVIDIA GPU Driver Version: 560
• Issue Type: question
Hello, I am trying to save photos of detected cars into a storage, but unfortunately i ran into an issue. The problem is that i need to get the frame and then crop it and save it and when I do that, the app crashes (exit code -11). I have tried setting the NVBUF_MEMORY_TYPE to 3, but this doesn’t do anything. How to solve this issue and save the image? I have also tried the same code on the Jetson ORIN NX and the code worked flawlessly. So there is some issue just on the GPU platform.
Here is the code I am using for saving the image:
gst_buffer = info.get_buffer()
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
l_frame = batch_meta.frame_meta_list
while l_frame is not None:
frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
frame_surface = pyds.get_nvds_buf_surface(hash(gst_buffer), frame_meta.batch_id)
frame_rgba = np.array(frame_surface, copy=True, order="C")
frame_bgr = cv2.cvtColor(frame_rgba, cv2.COLOR_RGBA2BGR)
filename = "image.jpg"
cv2.imwrite(filename, frame_bgr)