X-Git-Url: http://plrg.eecs.uci.edu/git/?p=IRC.git;a=blobdiff_plain;f=Robust%2Fsrc%2FBenchmarks%2FSSJava%2FEyeTracking%2FEyePosition.java;h=f5edbb88756f50f66d1512ac7cb43fbdaa16ee57;hp=8422220a1d6898e58e288792631597a1da431c0f;hb=d45bb251bdc1196d7848094fa2ccd566b39e021c;hpb=9d767c1f5cef3242ff67473368e5ad327c340bfa;ds=sidebyside diff --git a/Robust/src/Benchmarks/SSJava/EyeTracking/EyePosition.java b/Robust/src/Benchmarks/SSJava/EyeTracking/EyePosition.java index 8422220a..f5edbb88 100644 --- a/Robust/src/Benchmarks/SSJava/EyeTracking/EyePosition.java +++ b/Robust/src/Benchmarks/SSJava/EyeTracking/EyePosition.java @@ -29,23 +29,6 @@ public class EyePosition { private int x; @LOC("POS") private int y; - - @LOC("POS") private double facex; - @LOC("POS") private double facey; - @LOC("POS") private double facewidth; - @LOC("POS") private double faceheight; - - // private Rectangle2D faceRect; - - // public EyePosition(Point p, Rectangle2D faceRect) { - // this(p.x, p.y, faceRect); - // } - // - // public EyePosition(int x, int y, Rectangle2D faceRect) { - // this.x = x; - // this.y = y; - // this.faceRect = faceRect; - // } public EyePosition(int x, int y) { this.x = x; @@ -64,36 +47,6 @@ public class EyePosition { return "(" + x + "," + y + ")"; } - // public Deviation getDeviation(EyePosition oldEyePosition) { - // if (oldEyePosition == null) return Deviation.NONE; - // - // //first we check if the faceRects are corresponding - // double widthChange = (this.faceRect.getWidth() - - // oldEyePosition.faceRect.getWidth()) / this.faceRect.getWidth(); - // if (widthChange > 0.1) return Deviation.NONE; - // - // int maxDeviationX = (int)Math.round(this.faceRect.getWidth() / 4f); - // int maxDeviationY = (int)Math.round(this.faceRect.getWidth() / 8f); - // int minDeviation = (int)Math.round(this.faceRect.getWidth() / 16f); - // - // int deviationX = Math.abs(x - oldEyePosition.x); - // int directionX = sgn(x - oldEyePosition.x); - // if (deviationX < minDeviation || deviationX > maxDeviationX) directionX = - // 0; - // - // int deviationY = Math.abs(y - oldEyePosition.y); - // int directionY = sgn(y - oldEyePosition.y); - // if (deviationY < minDeviation || deviationY > maxDeviationY) directionY = - // 0; - // - // double deviationXPercent = deviationX / this.faceRect.getWidth(); - // double deviationYPercent = deviationY / this.faceRect.getWidth(); - // - // System.out.println(String.format("devX: %.2f | devY: %.2f", - // deviationXPercent*100f, deviationYPercent*100f)); - // return Deviation.getDirectionFor(directionX, directionY); - // } - private static int sgn(int i) { if (i > 0) return 1;