updateHistogramY(x1-x0,y-y0,input); applyToBlock(x1,y,input.width,y+1,input,output); updateHistogramY(x1-x0,y1-y0,input); applyToBlock(x1,y1,input.width,input.height,input,output); updateHistogramY(0,y-y0,input); applyToBlock(0,y,x0,y+1,input,output); updateHistogramY(0,y1-y0,input); applyToBlock(0,y1,x0+1,input.height,input,output);