@Override public void perform(IntRange range) { for (int iy = range.start; iy < range.stop; iy += range.incr) { final int y = Math.round(iy * ystep); for (int ix = startX, xstep = 0; ix < stopX; ix += xstep) { final int x = Math.round(ix * ystep); final int result = cascade.classify(sat, x, y); if (result > 0) { synchronized (results) { results.add(new Rectangle(x, y, windowWidth, windowHeight)); } } // if there is no hint of detection, then increase the // step size xstep = result == 0 ? smallStep : bigStep; } } } }, threadPool);
@Override public void perform(IntRange range) { for (int iy = range.start; iy < range.stop; iy += range.incr) { final int y = Math.round(iy * ystep); for (int ix = startX, xstep = 0; ix < stopX; ix += xstep) { final int x = Math.round(ix * ystep); final int result = cascade.classify(sat, x, y); if (result > 0) { synchronized (results) { results.add(new Rectangle(x, y, windowWidth, windowHeight)); } } // if there is no hint of detection, then increase the // step size xstep = result == 0 ? smallStep : bigStep; } } } }, threadPool);
final int x = Math.round(ix * ystep); final int result = cascade.classify(sat, x, y);
final int x = Math.round(ix * ystep); final int result = cascade.classify(sat, x, y);
if ((classifier.classify(positive.get(i), 0, 0) == 1) != AdaBoost.classify(data.getInstanceFeature(i), ensemble)) System.out.println("ERROR"); if ((classifier.classify(negative.get(i), 0, 0) == 1) != AdaBoost.classify( data.getInstanceFeature(i + positive.size()), ensemble)) System.out.println(classifier.classify(negative.get(i), 0, 0) + " " + AdaBoost.classify( data.getInstanceFeature(i + positive.size()), ensemble)); System.out.println("ERROR2");
if ((classifier.classify(positive.get(i), 0, 0) == 1) != AdaBoost.classify(data.getInstanceFeature(i), ensemble)) System.out.println("ERROR"); if ((classifier.classify(negative.get(i), 0, 0) == 1) != AdaBoost.classify( data.getInstanceFeature(i + positive.size()), ensemble)) System.out.println(classifier.classify(negative.get(i), 0, 0) + " " + AdaBoost.classify( data.getInstanceFeature(i + positive.size()), ensemble)); System.out.println("ERROR2");