i want to detect and count people when they comes inside in rectangle area in opencv caffemodel python
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
Just extend the tutorial program. Understand it, modify and test. Use 2 lines (formed in a cross) to detect people around the center of a rectangle and a ROI to limit the area of the rectangle.It should work, provided the will be no crowds.
rect = [(320, 40), (200, 350)] print(rect[1])
and inside for loop i m trying this in for (objectID, centroid) in objects.item() inside it i m trying this below code
if rectangle[0] < rects : totalUp += 1
then also didnt get result