I used dsexample as template to write a custom plugin. I add the following code to get image.
As I know, host_rgb_buf is gpu memory
cv::Mat in_mat;
cv::Mat out_mat;
in_mat = cv::Mat(fstracker->video_info.height, fstracker->video_info.width,
CV_8UC3, fstracker->host_rgb_buf, fstracker->video_info.width * 3);
cv::cvtColor (in_mat, out_mat, CV_RGBA2BGR);
Please let me know whether in_mat and out_mat is CPU memory