static int ocr_findOutExactHeightOfTaskBar_v1(O... _) { int grid = optPar grid(_, 8); // power of 2 is good RGBImage screenshot = optParOr screenshot(_, () -> shootScreenRGB()); int approxH = ocr_findOutApproximateHeightOfTaskBar_v1(paramsPlus(_, +screenshot, +grid)); RGB col = ocr_findOutApproximateHeightOfTaskBar_v1_dominantColor!; int approxY = screenshot.getHeight()-approxH; int y1 = approxY-grid/2, y2 = approxY+grid/2; RGBImage clip = rgbClip(screenshot, rectFromPoints(0, y1, screenshot.getWidth(), y2)); L slices = rgbImageVerticalSlices(1, clip); L dominantColors = map dominant332color(slices); //showImage(mergeImagesVertically(map rgbSingleColorCube(map rgbFrom332(dominantColors)))); int idx = indexOfLastChange(dominantColors); if (idx < 0) ret approxH; ret screenshot.getHeight()-(y1+idx); }