/** * Applies the dynamically computed threshold to each pixel in the image, one block at a time */ private void applyThreshold( T input, GrayU8 output ) { for (int blockY = 0; blockY < stats.height; blockY++) { for (int blockX = 0; blockX < stats.width; blockX++) { thresholdBlock(blockX,blockY,input,output); } } }