@LOC("THIS,ClassifierTree.C") int startPosX = (int) lastCoordinates.getX();
@LOC("THIS,ClassifierTree.C") int startPosY = (int) lastCoordinates.getX();
- for (@LOC("THIS,ClassifierTree.C") float factorDiff = 0.0f; Math.abs(factorDiff) <= maxScaleDifference; factorDiff =
+ TERMINATE: for (@LOC("THIS,ClassifierTree.C") float factorDiff = 0.0f; Math.abs(factorDiff) <= maxScaleDifference; factorDiff =
(factorDiff + sgn(factorDiff) * 0.1f) * -1 // we alternate between
// negative and positiv
// factors
@LOC("THIS,ClassifierTree.C") int maxDiffX = Math.max(Math.abs(startPosX - maxX), startPosX);
@LOC("THIS,ClassifierTree.C") int maxDiffY = Math.max(Math.abs(startPosY - maxY), startPosY);
- for (@LOC("CXY") float xDiff = 0.1f; Math.abs(xDiff) <= maxDiffX; xDiff =
+ TERMINATE: for (@LOC("CXY") float xDiff = 0.1f; Math.abs(xDiff) <= maxDiffX; xDiff =
(xDiff + sgn(xDiff) * 0.5f) * -1) {
@LOC("CXY") int xPos = Math.round((float) (startPosX + xDiff));
+
if (xPos < 0 || xPos > maxX)
continue;
// yLines:
- for (@LOC("CXY") float yDiff = 0.1f; Math.abs(yDiff) <= maxDiffY; yDiff =
+ TERMINATE: for (@LOC("CXY") float yDiff = 0.1f; Math.abs(yDiff) <= maxDiffY; yDiff =
(yDiff + sgn(yDiff) * 0.5f) * -1) {
@LOC("CXY") int yPos = Math.round(startPosY + yDiff);
if (yPos < 0 || yPos > maxY)
@LATTICE("THIS<IMG,IMG<C,C*,THISLOC=THIS")
public void doRun() {
- @LOC("C") int maxCount = 37;
@LOC("C") int i = 0;
- SSJAVA: while (i < maxCount) {
+ SSJAVA: while (i < 37) {
@LOC("IMG") Image image = ImageReader.readImage("data/b" + i + ".bmp");
i++;
if (image == null) {
private void processImage(@LOC("IN") Image image) {
@LOC("THIS,LEA.POS") FaceAndEyePosition positions = implementation.getEyePosition(image);
- if (positions.getEyePosition() != null) {
+// if (positions.getEyePosition() != null) {
deviationScanner.addEyePosition(positions.getEyePosition());
@LOC("THIS,LEA.DEV,DeviationScanner.DEV") int deviation =
deviationScanner.scanForDeviation(positions.getFacePosition());// positions.getEyePosition().getDeviation(lastPositions.getEyePosition());
System.out.println("deviation=" + deviationScanner.toStringDeviation(deviation));
// notifyEyeMovementListenerEyeMoved(deviation);
}
- }
+// }
lastPositions = positions;
}