Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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].width0.5, faces[i].y + eyes[j].y + eyes[j].height0.5 ); This is the middle/center of the eyes in pixel/image coordinates.

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. code.

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

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

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].widtheyes[j].width x 0.5, faces[i].y + eyes[j].y + eyes[j].heighteyes[j].height x 0.5 );

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