i have currently seen one tutorial in which people got detected and counted when they cross horizoantal line now i want to detect people in rectangle area when they cross rectangle area they got counted and detected coming in any direction how could i do this? this is url of tutorial sample program
https://www.pyimagesearch.com/2018/08/13/opencv-people-counter/