// Look for motion between 2 images // We only do one channel srecord noeq LookForMotion( IIntegralImage img1, IIntegralImage img2, int splitDepth // how often to split - our new, more intuitive measure over "featureSize" ) extends Probabilistic { bool verbose; record LookAtClip(Rect r) implements Runnable { run { // check whether image brightness has changed over the last image // if not: guess "no motion" // if yes: guess "motion" // split image // repeat procedure for each part of image } } run { schedule(root()); } LookAtClip root() { assertEquals("Sizes of compared images have to be equal", img1.getSize(), img2.getSize()); ret new LookAtClip(imageRect(img1)); } }