Eye detection - OpenCV
I am creating an android application that locates the users eyes. I have managed to get it working perfectly using a rectangle around the eyes. However, i would much prefer it if instead of rectangles, it was a circle around the eye. Does anybody know how i can do this? Also another issue i am having is that sometimes it draws alot of rectangles around the page where it thinks there is an eye. any way of stopping this ? Thanks in advance. Below is my code for drawing the rectangle around the eyes.
for (Rect rect : eyeDetections.toArray()) {
rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(0,255,0));
image.submat(rect.y, rect.y + rect.height, rect.x, rect.x + rect.width); // just the face. return this mat
}
Hi, Can you Give me the full code for eye detection(android) ?