Hello every one,
I am working with deepstream-test5-app with a custom save object frame to image.
i has save object to image with function:
bool save_image(gchar *path,
NvBufSurface *ip_surf, NvDsObjectMeta *obj_meta,
NvDsFrameMeta *frame_meta, gint obj_counter, gpointer obj_ctx_handle) {
NvDsObjEncUsrArgs userData = {0};
if (strlen(path) >= sizeof(userData.fileNameImg)) {
g_print ("Path save image out of size\n");
return false;
}
userData.saveImg = TRUE;
userData.attachUsrMeta = FALSE;
g_stpcpy(userData.fileNameImg,path);
userData.fileNameImg[strlen(path)] = '\0';
userData.objNum = obj_counter++;
nvds_obj_enc_process(obj_ctx_handle, &userData, ip_surf, obj_meta, frame_meta);
nvds_obj_enc_finish (obj_ctx_handle);
return true;
}
i call this function in bbox_generated_probe_after_analytics()
with two option:
Option1: Just save object
/// Save a cropped object
save_image("object_image.jpg", ip_surf, obj_meta, frame_meta, 0, appCtx->obj_ctx_handle);
Option2: Save object’s frame
/// Creating a special object meta in order to save a full frame
gint dummy_counter = 0;
NvDsObjectMeta *dummy_obj_meta = NULL;
dummy_obj_meta->rect_params.width = ip_surf->surfaceList[frame_meta->batch_id].width;
dummy_obj_meta->rect_params.height = ip_surf->surfaceList[frame_meta->batch_id].height;
dummy_obj_meta->rect_params.top = 0;
dummy_obj_meta->rect_params.left = 0;
save_image("full_frame.jpg", ip_surf, dummy_obj_meta, frame_meta, dummy_counter, appCtx->obj_ctx_handle);
• Issue: With option 1 it work well, but with option 2 i get an error:
**PERF: FPS 0 (Avg) FPS 1 (Avg)
Mon Nov 30 13:13:40 2020
**PERF: 0.00 (0.00) 0.00 (0.00)
** INFO: <bus_callback:181>: Pipeline ready
** INFO: <bus_callback:167>: Pipeline running
Segmentation fault (core dumped)
How i can fix it, help me
• Hardware Platform Jetson
• DeepStream Version 5.0
• JetPack Version 4.4.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type: bugs