[How to get frame matrix from tiler_src_pad_buffer_probe (deepstream_test3.c) after inference to use it with opencv]
I want to modify deepstream_test3 to use my tracker , i need to get frame after detection to insert it into the tracker . my problem that i can’t get the frame .
after reading deepstream python apps ,i found that deepstream_python_apps/deepstream_imagedata-multistream.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub
125:
is_first_obj = False
# Getting Image data using nvbufsurface
# the input should be address of buffer and batch_id
n_frame = pyds.get_nvds_buf_surface(hash(gst_buffer), frame_meta.batch_id)
n_frame = draw_bounding_boxes(n_frame, obj_meta, obj_meta.confidence)
# convert python array into numpy array format in the copy mode.
frame_copy = np.array(n_frame, copy=True, order=‘C’)
# convert the array into cv2 default color format
frame_copy = cv2.cvtColor(frame_copy, cv2.COLOR_RGBA2BGRA)
can solve my problem but it’s python.i want to know how to fix it with c or c++codes