static L ocr_highBlack_hsplit(RGBImage rgb) { int w = rgb.w(), h = rgb.h(); *float[w] data; for x to w: data[x] = l_highBlack(rgb, x, h/2); float threshold = max(data)/2; *bool[w] split; for x to w: split[x] = data[x] >= threshold; ret ocr_hsplit(rgb, split); }