+ @LATTICE("OUT<P,P<ED,ED<V,V<THIS,THIS<IN,V*,THISLOC=THIS,RETURNLOC=OUT,GLOBALLOC=IN")
+ public FaceAndEyePosition getEyePosition(@LOC("IN") Image image) {
+ if (image == null) {
+ return null;
+ }
+
+ @LOC("IN") float originalImageFactor = 1;
+
+ locateFaceRadial(image);
+
+ if (width > image.getWidth() || height > image.getHeight()) {
+ return null;
+ }
+
+ @LOC("OUT") EyePosition eyePosition = null;
+
+ if (x != -1) {
+ @LOC("ED") EyeDetector ed = new EyeDetector(image, x, y, width, height);
+ @LOC("P") Point point = ed.detectEye();
+ if (point != null) {
+ eyePosition = new EyePosition(point.getX(), point.getY());
+ }
+ }
+
+ System.out.println("eyePosition=" + eyePosition);
+
+ @LOC("OUT") FaceAndEyePosition fep = new FaceAndEyePosition(x, y, width, height, eyePosition);
+
+ return fep;
+ }
+
+