Please provide complete information as applicable to your setup.
**• Hardware Platform (Jetson NX)
**• DeepStream Version 5.1 • JetPack Version (valid for Jetson only) • TensorRT Version • NVIDIA GPU Driver Version (valid for GPU only)
**• Issue Type( new requirements)
**• When using deepstream_lpr_app for license plate recognition, how to take a screenshot of the vehicle with the detection frame? We can use deepstream and opencv to take a screenshot of the target vehicle, but the resolution is low.
Yes, the smaller the target, the smaller the resolution.Thanks very much for helping. Actually what I want to ask is how to take a screenshot of the target with bounding box.
int write_frame2(GstBuffer *buf, char *picture)
{
NvDsMetaList * l_frame = NULL;
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta (buf);
NvDsObjectMeta *obj_meta = NULL;
NvDsMetaList * l_obj = NULL;
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next) {
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
if (!frame_meta) {
continue;
}
for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next) {
obj_meta = (NvDsObjectMeta *) (l_obj->data);
if (!obj_meta) {
continue;
}
/* For Demonstration Purposes we are writing metadata to jpeg images of
* only vehicles for the first 100 frames only.
* The files generated have a 'OSD' prefix. */
NvDsUserMetaList *usrMetaList = obj_meta->obj_user_meta_list;
FILE *file;
printf("1111111111111111111\n");
while (usrMetaList != NULL) {
printf("000000000000000\n");
NvDsUserMeta *usrMetaData = (NvDsUserMeta *) usrMetaList->data;
if (usrMetaData->base_meta.meta_type == NVDS_CROP_IMAGE_META) {
NvDsObjEncOutParams *enc_jpeg_image =
(NvDsObjEncOutParams *) usrMetaData->user_meta_data;
/* Write to File */
file = fopen (picture, "wb");
fwrite (enc_jpeg_image->outBuffer, sizeof (uint8_t),
enc_jpeg_image->outLen, file);
fclose (file);
usrMetaList = NULL;
} else {
usrMetaList = usrMetaList->next;
}
}
}
}
return 0;
}
Call function command: write_frame2(buf, "tmp/test.jpg");
Through debugging, it is found that the variable usrMetaList is always NULL, so the picture cannot be saved.Please help me.
There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks
Can you check if you encoder the pic in nvds_obj_enc_process() in the deepstream_image_meta_test?