Ask Your Question

xanatos's profile - activity

2021-01-25 07:08:51 -0600 received badge  Notable Question (source)
2019-10-21 14:58:51 -0600 received badge  Popular Question (source)
2017-02-20 22:44:37 -0600 asked a question How to grab pixel coordinates of detected face/eyes?

I've got face and eye detection/tracking running and I'm interested in having OpenCV provide the coordinates of the initial cv2.rectangle corner coordinates. The rectangle is built using frame:

 cv2.rectangle(frame, (rect[0], rect[1]), (rect[2], rect[3]), (0, 255, 0), 2)

Is rect[0], rect[1] the "upper left" corner of the rectangle, and rect[3], rect[4] the "lower right" corner?

My goal is to have these parameters drive servos that will keep the moving face "centered" by having the camera move based on these variable values (as a relative position to center image coordinates less rectangle dimension offset).

Thanks for your help,

Dave