Not tested fn to calculate threshold values by Otsu's method
Basic Otsu's fn is working successfully
Avoiding number boxing for Otsu threshold
Simplest Otsu threshold fn