• Jetson Xavier
• Deepstream 6.0
• JetPack 4.6
• TensorRT 8.0.1
• NVIDIA GPU Driver 32.6.1
• All config files used in your app
Hello, i’m trying solve my issue: How to crop detected object using deepstream and deliver it to segmentation
But using custom plugin. And I’ve got a few questions about them
- Were can I find guides of systemised info about writing plugins for gstreamer/deepstream
- I need to preproccess the image for nvinfer using meta-info that i got. I used dsexample for the first plugin.
I found out that an image located in NvBufSurface , because we load data from dsexample->inter_buf to dsexample->cvmat. In function blur_objects instead of bluring i cropped only one object at frame (cropped object was located in in_mat). So that’s the question: how can I push the image to another plugins in pipeline and display cropped object on the screen(Well it’ the main question)
Well that is how blur_objects is looks like right now:
blur_objects (GstDsExample * dsexample, gint idx,
NvOSD_RectParams * crop_rect_params, cv::Mat in_mat)
{
cv::Rect crop_rect;
if ((crop_rect_params->width == 0) || (crop_rect_params->height == 0)) {
GST_ELEMENT_ERROR (dsexample, STREAM, FAILED,
("%s:crop_rect_params dimensions are zero",__func__), (NULL));
return GST_FLOW_ERROR;
}
/* rectangle for cropped objects */
crop_rect = cv::Rect (crop_rect_params->left, crop_rect_params->top,
crop_rect_params->width, crop_rect_params->height);
/* apply gaussian blur to the detected objects */
if(crop_rect_params->width > 40){
in_mat = in_mat(crop_rect);
cv::resize(in_mat, in_mat, cv::Size(640, 640), 0, 0, cv::INTER_CUBIC);
memcpy(dsexample->inter_buf->surfaceList[0].mappedAddr.addr[0], out_mat.ptr(), 640 * 640 * RGB_BYTES_PER_PIXEL); //That is my assumptions how pushingdata to the next plugin
}
//GaussianBlur(in_mat(crop_rect), in_mat(crop_rect), cv::Size(15,15), 4);
return GST_FLOW_OK;