i want to detect moving person & its centroid (without using centroidtracker) ,i have video of walking people,
this is my code
import cv2
face_cascade=cv2.CascadeClassifier('haarcascade_fullbody.xml')
frame=cv2.imread('person.png')
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.1, 4)
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 3)
cX = int((x+ w) / 2.0)
cY = int((y + h) / 2.0)
print(cX)
print(cY)
cv2.circle(frame, (cX, cY), 10, (205, 0, 255), -1)
cv2.imshow('img',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cv2.waitKey()
cv2.destroyAllWindows()

