!7 module WebCamFaceFinder > DynImageSurface { transient BufferedImage lastImage; FaceFinderByPictures1 finder; bool overlay; start { if (finder == null) finder = unstructFile(javaxDataDir("Face Finder/smallest-finder-over-95.struct")); doEvery(100, rstUpdate()); } afterVisualize { imageSurface_pixelated(imageSurface); } void update { if (imageSurface == null) ret; final BufferedImage img = dm_webCamImage(); temp tempAfterwards(r { lastImage = img }); if (img == null || img == lastImage) ret; FoundImgPlus found = finder.getPlus(RGBImage(img)); setSelection(foundImgToRect(found)); setImage(img); } }