static new ThreadLocal ocr_findOutApproximateHeightOfTaskBar_v1_dominantColor; static int ocr_findOutApproximateHeightOfTaskBar_v1(O... _) { int grid = optPar grid(_, 10); RGBImage screenshot = optParOr screenshot(_, () -> shootScreenRGB()); L slices = rgbImageVerticalSlices(grid, shootScreenRGB()); L dominantColors = map dominant332color(slices); //showImage(mergeImagesVertically(map rgbSingleColorCube(map rgbFrom332(dominantColors)))); int idx = indexOfLastChange(dominantColors); if (idx < 0) ret 0; ocr_findOutApproximateHeightOfTaskBar_v1_dominantColor.set(rgbFrom332(last(dominantColors))); int h = 0; for (; idx < l(slices); idx++) h += slices.get(idx).getHeight(); ret h; }