I can get frames from my webcam using OpenCV in Python. The camshift example is close to what I want, but I don\'t want human intervention to define the object. I want to ge
if faces:
for ((x, y, w, h), n) in faces:
pt1 = (int(x * image_scale), int(y * image_scale))
pt2 = (int((x + w) * image_scale), int((y + h) * image_scale))
ptcx=((pt1[0]+pt2[0])/2)/128
ptcy=((pt1[1]+pt2[1])/2)/96
cv.Rectangle(gray, pt1, pt2, cv.RGB(255, 0, 0), 3, 8, 0)
print ptcx;
print ptcy;
b=('S'+str(ptcx)+str(ptcy));
This is the part of the code I tried to get the center of the moving object when tracked using a rectangular boundary.