Person counting based on Imaginary line crossing using nvidia deepstream sdk

Hello,
I am new on deep stream. I am using deep stream_test-2 app in that I want to count the person like if he cross the imaginary line which is drawn like:

    NvOSD_LineParams *line_params = &display_meta->line_params[0]; 
    line_params->x1 = 0;
    line_params->y1 = MUXER_OUTPUT_HEIGHT/2; 
    line_params->x2 = MUXER_OUTPUT_WIDTH;
    line_params->y2 = MUXER_OUTPUT_HEIGHT/2;
    line_params->line_width = 4;
    line_params->line_color.red = 0.0;
    line_params->line_color.green = 0.0;
    line_params->line_color.blue = 1.0;
    line_params->line_color.alpha = 0.7;
    display_meta->num_lines++; 

If person cross this line in upper side then I want to update in-count++ and if down side then update out-count++, so how should I go please suggest me or if this is implemented in deep stream app so share me please…
please help me out to solve this problem thanks.

We will add the feature on next release, and are checking internally to see if there is a sample code for your reference.

Thanks for response.
If you got that sample code than share it I need urgent requirement of that in my project.
thanks…

Thanks for response.
If you got that sample code than share please I need that.
thanks…

You would need to have two lines defined one for direction and other for actual line crossing. Using tracker id, u need to maintain a history based on which u need to have stochastic estimation of direction and using cosine check if its in the same direction. then plug the current coordinate of object in the LC equation. maintain the value whether +ve or -ve, and each frame after estimation of direction u need to check if its moving in configured direction and if there is a sign change i.e. +ve to -ve or vice versa when using the current object coordinate for LC, then actual crossing has happened. Its not a straight forward implementation as u need to do clustering and thresholding to avoid false +ve.

I would recommend to wait for official release or if u want to implement, u can proceed,

Thanks for your response.
when it will be release ?

Gentle reminder for sharing the tentative release date.

The plan is to have the next release at spring time frame, please stay tuned.