How to detect a face and extract its coordonates to use the coordinatesw

asked 2016-07-27 08:59:13 -0600

I want to detect a Face and know how far is it from the middle of the screen. I will use this to move the camera to return the face to middle of the screen

edit retag flag offensive close merge delete

Comments

1

please have a look at the tutorial

berak gravatar imageberak ( 2016-07-27 09:03:00 -0600 )edit

Thank you for your reply. Problem is, this tutorial only detects the face, how can i know how far is the face from the middle of the screen for example

Frankverander gravatar imageFrankverander ( 2016-07-27 09:24:13 -0600 )edit
1

cmon, that's simple maths..

imgwidth/2 is the center of the screen, (rect.x+rect.width/2) is the center of the face

berak gravatar imageberak ( 2016-07-27 09:28:23 -0600 )edit

Haha are you kidding me?

StevenPuttemans gravatar imageStevenPuttemans ( 2016-07-28 03:46:56 -0600 )edit