srecord noeq ImageSimilarityAtScale( IIntegralImage img1, IIntegralImage img2, int featureSize // smallest block size looked at (in pixels) ) extends Probabilistic { record LookAtClip(Rect r) { run { img1.get if (r.w > r.h) { if (r.w > featureSize) splitHorizontally(); } else if (r.h > featureSize) splitVertically(); } } void splitHorizontally { } void splitVertically { } } run { assertEqualsVerbose("Sizes of compared images have to be equal", img1.getSize(), img2.getSize()); schedule(new LookAtClip(imageRect(img1))); } }