Line crossing in Nvdsanalytics

Hello everyone,
I am using nvdsanalytics plugin in a pipeline and saving the output video. My questions are regarding nvdsanalytics plugin and its parameters in config file. Please have a look on my following queries-

  1. In line-crossing part of nvdsanalytics, it counts by adding “+1” whenever a person crosses the line in the specified direction but how to count by adding “-1” if a person crosses from opposite direction.
    what I thought of is creating two lines with opposite direction and of same coordinates, then later using custom plugin(which I don’t know how to build) to find difference between the counts. Please share any other method if exist.

  2. While defining line-crossing part, the direction parameter requires coordinates of two points which define the direction for counting. Is the direction is very specific? Means for example-
    If in a video there is one line along the width(in horizontal direction) and people are moving along the height of video(in vertical direction) Nvdsanalytics will count the person if his direction is along the direction specified in the paramerter. But if a person is crossing line diagonally( not in a straight line) will it count that person? If no then what should be done to count that person.

Thanks in advance.

• Hardware Platform GPU
• DeepStream Version - 5.0
• NVIDIA GPU Driver Version - 440.33.01

For 1st question, same as your idea, we can have two lines and in the application probe user can subtract one count from other.
For 2nd, max tolerance is 30 degree on each side.

I suggest you to use roi rather than line-crossing, when you leave the roi, the couting number will -1.

hello, thank you for your suggestion I will use roi.