!7 sbool firstTime = true; static int maxOriginalImageSize = 500; p-experiment-tt { framesBot(); centerFrameWithWidth(700, setFrameTitle( firstTime ? "Select picture of magic wand" : "There - I put the wand upright for you! Select another picture?", selectSnippetID_v1(#1101217, vf1(f go)))); firstTime = false; } svoid go(S imageID) { Class recognizer = hotwire(#1015046); setMulti(recognizer, aiTitle := "Finding Wand...", thresholdRounds := 20000, showRepro := true); focusConsole(); Pair p = cast quickImport(call(recognizer, 'imageToCode, imageID, 1)); BackgroundPlus s = shallowCloneToClass(BackgroundPlus, unstruct(p.a)); double angle = sortLineByY((LineWithColor) first(s.things)).angle(); moveToTopCenter(showImage_centered("Wand facing up (or down)!", rotateImageInSameSize( scaleBufferedImageToMax(maxOriginalImageSize, (BufferedImage) get(recognizer, 'fullSizeImage)), 180-angle))); callMain(); // do it again }