How to create and select a Region of Interest and also to create a line inside a deepstream app?

How to create and select a Region of Interest (eg a 5 sided polygon to only analyse that area leaving the rest aside) and also to create a line (eg to perform line count etc) inside a deepstream app?

Any idea on the same along with some code snippets can help.

why the rectangle detection can’t meet your requirement?
And according to what to draw 5 sided polygon?

Hello ChrisDing,

can you please explain how to do a rectangle-based ROI detection? I cannot find any examples, any help would be really appreciated.

Thanks

Hi gsdeepaksh,

Is this still an issue at your sides?

Hi robert.varkonyi,

Please refer to this thread if can help: [url]I'm not sure how to specify the coordinates of a specific area (ROI) in deepstream-app. - DeepStream SDK - NVIDIA Developer Forums
If not, please file a new topic instead.

Thanks

I think you have to modify the nvinfer code to crop ROI (rectangle) and do some padding (for polygon) and then push to input queue.

nvinfer diagram is here:
[url]DeepStream SDK FAQ - DeepStream SDK - NVIDIA Developer Forums

Reference code: https://devtalk.nvidia.com/default/topic/1067010/deepstream-sdk/roi-for-source-video-in-deepstream-app/post/5404543/#5404543