Updated Otsu's algorithm to use local thresholds

Split the image in tiles and apply Otsu locally for each tile