NVDSAnalytics LineCrossing pixel coordinates

Hello, I have a DS pipeline composed by:
filesrc -> … -> nvstreammux -> nvinfer -> nvtracker -> nvdsanalytics -> nvosd -> … -> filesink

The file video has a resolution of 960 x 480 pixels, stream mux scales it to 1980 x 1080, and the nvtracker has 1984 x 1088 tracker-width / tracker height (for some reason it has to be multiples of 32). My question is respect to which coordinate system should I use to configure the nvdsanalytics object.

If I use the original 960 x 480 coords space, the lines get displayed shifted and shrinked, and if I use the 1980 x 1080 the lines get drawn “outside” the video (I get to see just some edges of the arrows that indicate direction).

I don’t care “too much” if the lines get displayed wrong when using nvosd, I’m more concerned about configuring correctly the nvdsanalytics element so that the events are properly detected and the metadata is generated, even if the lines are shifted, so which coordinate system should I use to properly configure that element?

thanks in advance

Hi,
You need to set coordinates according to config-width and height in analytics config file, those lines will get scaled according to the input stream resolution.

https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.3.14.html#wwpID0E0PE0HA

2 Likes