How to get coordinates?

How to get the coordinates of the face?

Hi, according to this tutorial,I am trying to get some information from the faces which will be detected.

Could any body tell me how I can get the coordinates of each circle around the faces?
Is there any prepared source code or tutorial for doing this?

edit retag close merge delete

Sort by ยป oldest newest most voted

Isnt everything already in the source code?

You have the faces and eyes vector. Those entries include the x, y position and also width and height. The eye position seems to be relative to the face position, so you need to calculate that, but actually its also already in the code.

Point center( faces[i].x + eyes[j].x + eyes[j].width x 0.5, faces[i].y + eyes[j].y + eyes[j].height x 0.5 );

This is the middle/center of the eyes in pixel/image coordinates.

more

@StevenPuttemans Thank you for your help. Could you please tell me how I can get the center pixel of the circle (not eyes) as an output?

( 2013-08-15 18:54:46 -0500 )edit

StevenPuttemans didnt answer your question. He just edited my answer and changed eyes[j].width * 0.5 to eyes[j].width x 0.5. I dont know why he changed * to x. Btw, what do you mean with circle? Basically that are all circles, around the face, around the eyes.

But the center of the face would be

Point center( faces[i].x + faces[i].width0.5, faces[i].y + faces[i].height0.5 );

( 2013-08-16 00:54:45 -0500 )edit

I changed the * because the syntax highlighting takes two following asterixes for italic typing. So i replaced by ;ultiply signs. Please do that in your remark also. Your code isn't logical now.

( 2013-08-16 03:09:12 -0500 )edit

( 2013-08-16 03:51:42 -0500 )edit
1

I cant edit it anymore. Its giving me some internal server error.

So here:

Point center( faces[i].x + faces[i].width x 0.5, faces[i].y + faces[i].height x 0.5 );

( 2013-08-16 03:58:43 -0500 )edit