+
+ public FaceAndEyePosition getEyePosition( Image image) {
+ if (image == null) {
+ return null;
+ }
+
+ float originalImageFactor = 1;
+
+ locateFaceRadial(image);
+
+ if (width > image.getWidth() || height > image.getHeight()) {
+ return null;
+ }
+
+ EyePosition eyePosition = null;
+
+ if (x != -1) {
+ EyeDetector ed = new EyeDetector(image, x, y, width, height);
+ Point point = ed.detectEye();
+ if (point != null) {
+ eyePosition = new EyePosition(point.getX(), point.getY());
+ }
+ }
+
+ System.out.println("eyePosition=" + eyePosition);
+
+ FaceAndEyePosition fep = new FaceAndEyePosition(x, y, width, height, eyePosition);
+
+
+ return fep;
+ }
+
+