By Peter Haub (based on work by G. Landini and Fiji developers)
Computes the local threshold based on Auto Local Threshold (MidGrey method) see: https://imagej.net/Auto_Local_Threshold see code in: https://github.com/fiji/Auto_Local_Threshold/blob/master/src/main/java/fiji/threshold/Auto_Local_Threshold.java Formular:
if (value > ( (max + min)/2.0 - c_value) ) value = 0
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.32.0.1.jar.
Ext.CLIJx_localThresholdMidGrey(Image source, Image destination, Number radius, Number c_value);